Forum Discussion
Regarding ranking using dax
- 2 years ago
Hi vivekn280393 -Can you please upload pbix file in drive , it helps to analyse.
Thank you
- Anonymous2 years 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.
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 Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.