Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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))
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.