Comparing Different Time Periods

https://www.daxpatterns.com/comparing-different-time-periods/

Compare measure amounts using 2 different time periods.

Add a new Date table (e.g. Comparison Date) that is a duplicate of the existing date table. 

The relationship between Date and Comparison Date is Many-to-1 and Inactive. Cross filter direction = Single. Activate the relationship in the measure.

Add 2 slicers; one uses Date table, the other uses Comparison Date table.

Compare measures using the 2 Date tables.

Comparison Sales Amount =

CALCULATE([Sales Amount], REMOVEFILTERS('Date'), 

USERELATIONSHIP('Date'[Date], 'Comparison Date'[Comparison Date])

)




Comments

Popular posts from this blog

Difference between DISTINCT and VALUES in DAX