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.
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
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
18 | |
13 | |
7 | |
5 |