Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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 25th 2023
Table
Revenue (May.03.2023 to May.25.2023)
Previous Period Revenue (May.03.2022 to May.25.2022)
%Change between these two metrics
I have been using the common used SAMEPERIODLASTYEAR and it works perfectly if I chose the Date slicer has 2022. But if I only choose as the example above, it does not work. Could any one help me with this one please? Thank you so much!
Solved! Go to Solution.
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)
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)
Hi @Uzi2019 ,
It is still not working if I do not choose the Date slicer that including last year...
For example above, if I choose Date slicer to be within May 2023, the Previous Sales as an independent measure would not appear. I want the Previous Sales as a measure also 😉 Thank youu
hi @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.
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! 😉
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.