Forum Discussion
Regarding ranking using dax
Hi All,
Hi vivekn280393 -Can you please upload pbix file in drive , it helps to analyse.
Thank you
- Anonymous1 year ago
Hi vivekn280393 ,
I suggest you to try RANKX() Function to create a measure.
Rank by Department = RANKX(ALLEXCEPT('Table','Table'[Department Name]),CALCULATE(SUM('Table'[EmpCTC])),,DESC,Dense)If you only want to show Top 2nd based on Department Name in your visualization, you can try to add this rank measure into visual level filter and set it to show items when value <=2.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- rajendraongole1Super User
Hi vivekn280393 -Can you please upload pbix file in drive , it helps to analyse.
Thank you
- AnonymousNot applicable
Hi vivekn280393 ,
I suggest you to try RANKX() Function to create a measure.
Rank by Department = RANKX(ALLEXCEPT('Table','Table'[Department Name]),CALCULATE(SUM('Table'[EmpCTC])),,DESC,Dense)If you only want to show Top 2nd based on Department Name in your visualization, you can try to add this rank measure into visual level filter and set it to show items when value <=2.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_MathurSuper User
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.