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
So I am trying to learn how to use the new WINDOW, OFFSET & INDEX functions that where released in December as they seem that they could be very useful in a lot of situations, but I just can't get the measures to work. I have read the documentation and watched multiple video tutorials but can wrap my head around how this works behind the scenes.
In this case I am trying to build a rolling total. I am testing this on a simple model with only two tables Date dimension and fact sales.
The only thing I got to work is the very simple example most videos show. Anything more complex then this I cannot get to work properly (my idea was to build a moving average with a variable window size input by the user through a parameter, but I am very far from acheiveing this).
So up until here it works fine, but of course I don't want to display the data like this (using MonthYearNum), instead I would like to display it with the YEAR and MONTH fields as follows:
The problem there, to my understanding, is that the fields I added are not stated in the [RELATION] table argument and by default are added into the PARTITION argument, explaining why I get the same value in both columns.
The thing is that the problem persists even if I add these columns to the expressions with the difference that at some apparently random point it starts returning different values, although they aren't the expected values:
Something else I find strange is that if I remove the MONTH field from the visual, it works properly, although I can't acheive the visualization I am looking for.
Apparently there are somethings about DAX I still don't quite understand and would like to. Can anybody help me with this and/or provide me with some useful resource to learn both how to use these functions as well as understand what is happening behind the scenes (so maybe some material about how DAX works at a fundamental level).
I would very much appreciate any help and I thank you all in advanced!
@LucianoAnton You don't need those functions to build a moving/rolling average. Check out this video for rolling average:
And this one for some of the pitfalls working with the functions you mentioned:
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.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 9 | |
| 8 |