Forum Discussion
Ranking with matrix
- 3 years ago
Hi , kusanagi
According to your dax code, normally it can work in my understand .
I use your dax code in my side , it works good , and this is my test data:
When i use this dax code :
Measure 2 = RANKX(ALLSELECTED('Table'[Item]) , [Qty] , ,DESC,Dense)So i think it may cause by the other reason in your side.
You can try to use this dax code :
Measure = IF( HASONEVALUE('Table'[Item]) , RANKX(SELECTCOLUMNS(CALCULATETABLE( 'Table' , ALLSELECTED('Table'[Item]) ),"Item",[Item]) , [Qty] ,,DESC,Dense))If you still can not solve this problem , can you share the sample .pbix file to me (without sensitive data in it) so that i can test it in my side.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , kusanagi
According to your dax code, normally it can work in my understand .
I use your dax code in my side , it works good , and this is my test data:
When i use this dax code :
So i think it may cause by the other reason in your side.
You can try to use this dax code :
Measure = IF( HASONEVALUE('Table'[Item]) , RANKX(SELECTCOLUMNS(CALCULATETABLE( 'Table' , ALLSELECTED('Table'[Item]) ),"Item",[Item]) , [Qty] ,,DESC,Dense))
If you still can not solve this problem , can you share the sample .pbix file to me (without sensitive data in it) so that i can test it in my side.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly