The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.