Press "Enter" to skip to content

Viewing N Months In Power BI

Jason Thomas shows a nice method to combine data for the last N months along with a month-by-month breakdown using a single date dimension:

Create 3 measures as shown below, and then add those 3 measures in the report along with a month slicer as shown below. You can change the month in the slicer and verify that the measure values change for the selected month.


Sales (Selected Month)
 = SUM ( Sales[Sales] )

Sales Last Year
 = CALCULATE ( SUM ( Sales[Sales] )SAMEPERIODLASTYEAR ( ‘Date'[Date] ) )

Sales YTD 
TOTALYTD ( SUM ( Sales[Sales] ), ‘Date'[Date] )

This is the first time I’ve seen a What If parameter in use.  Very interesting.