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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
I am using rolling 12 months filter on my dashboard which will return the last 12 months date ie. from 1st nov 2022 to 31st oct 2023.
I want to calculate the previous period I was using below:
calculate(measure, dateadd(lastdate(calendar(date),-365, day)
Its giving blank value how i can get the previous period value?
I can't give calendar table on the dashboard. It shoudld be dyanmic.
I have used one period table and it is connected to date dimenison (bidirectional).
By deafult my reports will have period filter as "rolling 12 months" which will give last 12 months data.
Rolling 12 months calculation:
Date.StartOfMonth(Date.AddMonths(TodaysDate,-12)), Date.EndOfMonth(Date.AddMonths(TodaysDate,-1))
so this will filter the date from 1-nov-2022 to 31-oct-2023. I want to compare the measure value to previous period.
Previous period as per me will be from 1-nov-2021 to 31-oct-2022.
Hi,
Try these measures
Measure = calculate([measure],datesbetween(calendar[date],edate(eomonth(today(),-2)+1,-11),min(calendar[date])-1))
Measure1 = calculate([measure],sameperiodlastyear(calendar[date]))
Create slicer for Year and Month from the Calendar Table and select any one year and month.
Hope this helps.