March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |