Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I am trying to create a measure that totals the past 12 months of revenue in Power Pivot. I have a date table and my data table linked. I created a Revenue measure that is calculating correctly
Revenues:=-CALCULATE(SUM('Data'[Revenue]))
I create a 12 MTD Revenue measure that looks correct, but one I put it in a pivot table by month, it is only pulling the current month's revenue total rather than a sum of the past 12 months.
Any ideas?
12 MTD Revenue:=CALCULATE( [Revenues], DATESINPERIOD('Calendar'[Date],MAX('Data'[End Month]), -12, MONTH))
have you marked your calendar table as date table?
Hi @georgemaka ,
Did you add the year and month columns from the Calendar table to the chart?
I was able to return the correct results using your measures.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
12 MTD Revenue:= var m = MAX('Data'[End Month]) return CALCULATE([Revenues],'Data'[End Month]>EDATE(m,-12))