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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I need help with a 12 month rolling fomula. The formula I created in DAX as a measure is:
12 Mo Rolling = CALCULATE(SUM('SELL THRU'[Sales Dolalrs]),
DATESBETWEEN(
'SELL THRU'[Date].[Date],
NEXTDAY(SAMEPERIODLASTYEAR(LASTDATE('SELL THRU'[Date].[Date]))),
LASTDATE('SELL THRU'[Date].[Date])
))
This appears to work, however my problem is that I don't want the formula to include anything for future months. If I have 2016 and 2017 data the formula will add, for example, sales from April 2017 back to May 2016 for April 12 Mo Rolling, however when I get to a future month it accumulates back 12 months but I want to show zero.
Any suggestions would be appreciated.
Thanks,
PMike