Forum Discussion
Confusing behaviour of OFFSET function
- 3 years ago
Well, the short answer is "yes" 🙂
Window functions return a row in their source table. The external context is used only to determine what the current row in the source table is. Consequently, their lineage is that of the source table.
If you mix in the matrix fact and dim columns, it just becomes a mess. Add to it that ALLSELECTED is nearly always there, it is the perfect recipe for some hours spent trying to understand what is happening with the filter context.
Keep in mind: window functions are designed to be powerful, not simple. They require some getting used to.
Anyway, thanks for the question, it clearly shows you have a sound understanding of the DAX principles, I love these questions when I see them.
Well, the short answer is "yes" 🙂
Window functions return a row in their source table. The external context is used only to determine what the current row in the source table is. Consequently, their lineage is that of the source table.
If you mix in the matrix fact and dim columns, it just becomes a mess. Add to it that ALLSELECTED is nearly always there, it is the perfect recipe for some hours spent trying to understand what is happening with the filter context.
Keep in mind: window functions are designed to be powerful, not simple. They require some getting used to.
Anyway, thanks for the question, it clearly shows you have a sound understanding of the DAX principles, I love these questions when I see them.
- RobertSlattery3 years agoResponsive Resident
Thanks for confirming Alberto, it helps a lot to have your perspective. I hope that this behaviour is discussed in the community because, it seems to me, it is not a difficult one to stumble upon so, people probably need to be aware of it.
Certainly my knowledge of DAX principles would be a lot less without the content shared by yourself and Marco and your team. We are all very grateful!