Time-intelligence functions are group of DAX functions that give you insights from different time dimensions.
In this video we’ll learn how to calculate the difference between this year and last year sales.
Start with creating the Total Sales measure:
Total Sales = SUM(Sales[SalesAmount])
Then calculate last year sales:
Sales LY = CALCULATE( [Total Sales],SAMEPERIODLASTYEAR([Date]))
After you have both measures, subtract one from another to find out the difference. To remove empty and repeating rows in the first year, use the IF function.
Difference = IF ( ISBLANK ([Total Sales PY]), BLANK(), [Total Sales] – [Total Sales PY])
Finally, calculate a percent difference: