Forum Discussion
Why does sorting by rankx-function and measures work in desktop but not in Power BI Service?
- Anonymous4 months ago
Hi sande_ch ,
Thanks for the update and for checking it.In Power BI, measures such as those created using RANKX are evaluated based on the current filter context. Because of this behavior, their results can change depending on how the visual is filtered or interacted with.
For sorting behavior, Power BI provides the Sort by column option, which allows a field to be sorted based on another column defined in the model. This enables a consistent sort order defined at the model level.
If the issue persists, sharing a simplified version of the report or visual setup would help in understanding the exact scenario.
Thank you.
Hi sande_ch ,
Thank you collinq for the response provided!
Has your issue been resolved? If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.
Thank you.
Hi
No, unfortunately it did not solve my problem. But thank you for the support!
Sandra
- Anonymous4 months agoNot applicable
Hi sande_ch ,
Thanks for the update and for checking it.In Power BI, measures such as those created using RANKX are evaluated based on the current filter context. Because of this behavior, their results can change depending on how the visual is filtered or interacted with.
For sorting behavior, Power BI provides the Sort by column option, which allows a field to be sorted based on another column defined in the model. This enables a consistent sort order defined at the model level.
If the issue persists, sharing a simplified version of the report or visual setup would help in understanding the exact scenario.
Thank you.- sande_ch4 months ago
Helper I
Hello Anonymous,
Thank you very much for your message.
For my use case, it’s important that the current filter context is taken into account. The “Sort by column” option doesn’t work with this logic.
In my first post, I shared a link that lets you access a simplified Power BI report with this sorting logic.
Thank you very much for your support.
Best regards