Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have matrix and I am trying to caluate the ranking with hierachy, the dax works if the hierarchy is coming from the same table, and doesn't work if it is coming from another table.
Below is the Dax I am using to create the rank function
Solved! Go to Solution.
Hi,
Thanks for your reply.
But I think there is a bug in Power BI i.e. the dax query I was using is working fine when I deleted the old matrix I was using and was working fine when I created a new matrix.
Hi @Anonymous ,
Seems like a dynamic hierarchy rankx in matrix visual, you can rerfer these articles that could help you:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for your reply.
But I think there is a bug in Power BI i.e. the dax query I was using is working fine when I deleted the old matrix I was using and was working fine when I created a new matrix.
Hi @Anonymous ,
You can refer to this article.
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
Regards,
HN
@Anonymous , In case of rank If you create a rank on City and even add CIty Id it will not work. For Rank measure context is very important .
In this Example on 2nd and 3rd give correct Rank with Rank City and Citym which are the lowest level in my table
City Rank = RANKX(all(Geography[City]),[Sales]) // Do work with City ID
Geography Rank = RANKX(all(Geography),[Sales]) // Table is used
City and ID Rank = RANKX(all(Geography[City],Geography[City Id]),[Sales])
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
Hi @Anonymous
Can you provide what you expected as a result?
Hi,
This is how I am expecting the rank to work
Hi,
Share the link from where i can download your PBI file.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
121 | |
79 | |
48 | |
38 | |
31 |
User | Count |
---|---|
192 | |
79 | |
70 | |
50 | |
42 |