Forum Discussion
Ranking - negative or positive
- 6 years ago
Use the ABS function to render all values positive and then use that in the RANKX measure. (Or new column)
This blog post may help (if you wish to display the actual rank):
- 6 years ago
Rankx(all(Table[compnay]), calculate(abs(sum(table[sales variance]))),,asc,dense)
by adding ABS function it gives the desired output.
Thanks
mb0307 , create ascending rank on sales variance
rankx(all(Table[compnay]), calculate(sum(table[sales variance])),,asc,dense)
you can use topN too
https://databear.com/power-bi-dax-topn-function/
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
Rankx(all(Table[compnay]), calculate(abs(sum(table[sales variance]))),,asc,dense)
by adding ABS function it gives the desired output.
Thanks