Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
Rolling windows. DATESINPERIOD('Date'[Date], end_date, -3, MONTH) returns the dates of the three months that end on end_date. A negative count reaches back. Anchor it on the last visible date with MAX('Date'[Date]), so the window moves with the row. January has no earlier months with orders, so its window holds only January.
Orders 2M = CALCULATE([Orders], DATESINPERIOD('Date'[Date], MAX('Date'[Date]), -2, MONTH))Monthly revenue jumps around, so the sales director wants a smoother line: each month's revenue together with the two months before it.
Write the measure Revenue 3M on order_items: Revenue over the three months ending on the last day of the row's month. Use DATESINPERIOD on 'Date'[Date]. The matrix shows Revenue and Revenue 3M by month of 2025.
Matrix
Updates as you typeFilters on this visual'Date'[Year] is 2025
Loading the Brightline model…
Language
Full plan
Power BI ✓ · Excel and SQL also included
Cancel anytime · 14-day full refund · Secure payment by Stripe