Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi, I have this measure for 12 months rolling sales:
I suggest to look at the endofmonth function, so go one month back and then endofmonth as your boundary.
https://docs.microsoft.com/nl-nl/dax/endofmonth-function-dax
Hope it helps. Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
hi havnt tried but maybe something like this.
might get funky if your calendar is not complete?
var minDate=EOMONTH(MAX('Calendar'[Date]),-13)
var fromDate=DATE(YEAR(minDate),MONTH(minDate),1)
var toDate=EOMONTH(MAX('Calendar'[Date]),-1)
return
CALCULATE(SUM(Table2[value]),
FILTER(ALL('Calendar'),
'Calendar'[Date]>=fromDate &&
'Calendar'[Date]<=toDate
)
)
User | Count |
---|---|
17 | |
14 | |
13 | |
13 | |
12 |
User | Count |
---|---|
19 | |
15 | |
14 | |
10 | |
9 |