Forum Discussion
DiepNhiep
2 years agoFrequent Visitor
PeriodOverPeriod with Date slicer
Hi, I would like to get help with the Measure of custom period and date slicer. I want to show the table with this information, for example Date slicer in report to be set: May 3rd 2023 to May 25...
- 2 years ago
Hi DiepNhiep
you can try with DATEADD() to calculted previous year record of same period.
Measure=
Var Previous sales = CALCULATE(SUM(Table[Sales]),DATEADD('Calendar'[Date],-1,YEAR))
Var Current sales= CALCULATE(SUM(Table[Sales]),DATEADD('Calendar'[Date],0,YEAR))
Return Divide((Current Sales-Previous sales),Previous Sales)
Uzi2019
Community Champion
2 years agohi DiepNhiep
you can create seperate measure for Prev Sales.
and create seperate measure for %Change.
if it does not help then please share the screen shot of what value you are getting and what value you want.
DiepNhiep
2 years agoFrequent Visitor
No problem at all, I just found out I had a small careless mistake. Your way is actually working, gonna mark it as the solution.
Have a nice day, thanks a lot again! 😉