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.
Hi RobertSlattery ,
You can review the following video to get a better understanding on the function OFFEST.
If the above one can't help you, could you please provide more raw data in 'Customer' and 'Sales Order' table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? By the way, is there any relationship created between 'Customer' and 'Sales Order' table? It would be helpful to find out the solution. You can refer the following links to share the required info:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- RobertSlattery3 years agoResponsive Resident
Hello, the code I listed is for the standard Adventure Works test report but, I added a link to a working example. I had watched the video you linked and like all of the ones I have seen to date, is a trivial example that does not meet this problem.