Forum Discussion
Measure to know productivity
- 9 years ago
Hi Anonymous,
The DAX provided in my previous post is for calculated columns rather than measures. To use measures to rank, you can write the DAX like below:
Rank-Iteams01 = RANKX(ALL('Table1'),CALCULATE(SUM('Table1'[ProducedItems]),ALLEXCEPT(Table1,Table1[Machine])))
Rank-Itesm/Time01 = RANKX(ALL('Table1'),DIVIDE(CALCULATE(SUM('Table1'[ProducedItems]),ALLEXCEPT(Table1,Table1[Machine])),CALCULATE(SUM(Table1[Total time]),ALLEXCEPT(Table1,'Table1'[Machine]))))
Best Regards,
Qiuyun Yu
I've tried your suggestion on top of the values I have, but it did not work, did I do something wrong?
Rank-Items/Time = RANKX(ALL(Indicadores);DIVIDE(Indicadores[Total Produção];Indicadores[Total Tempo]))
Hi Anonymous,
The DAX provided in my previous post is for calculated columns rather than measures. To use measures to rank, you can write the DAX like below:
Rank-Iteams01 = RANKX(ALL('Table1'),CALCULATE(SUM('Table1'[ProducedItems]),ALLEXCEPT(Table1,Table1[Machine])))
Rank-Itesm/Time01 = RANKX(ALL('Table1'),DIVIDE(CALCULATE(SUM('Table1'[ProducedItems]),ALLEXCEPT(Table1,Table1[Machine])),CALCULATE(SUM(Table1[Total time]),ALLEXCEPT(Table1,'Table1'[Machine]))))
Best Regards,
Qiuyun Yu