Forum Discussion
RANKX issue
- 5 years ago
Hi Anonymous ,
You can use the following measure in your table visual:
Rang CA BU Mois Filtre = var a = SUMMARIZE(ALL(Stores),Stores[Magasin],"CA TTC",[CA TTC Mois],"rank",RANKX(ALL(Stores),CALCULATE([CA TTC Mois],ALLEXCEPT(Stores,Stores[Magasin])),,DESC)) return SUMX(FILTER(a,Stores[Magasin] = MAX(Stores[Magasin])),[rank])If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi Anonymous ,
You can use the following measure in your table visual:
Rang CA BU Mois Filtre = var a = SUMMARIZE(ALL(Stores),Stores[Magasin],"CA TTC",[CA TTC Mois],"rank",RANKX(ALL(Stores),CALCULATE([CA TTC Mois],ALLEXCEPT(Stores,Stores[Magasin])),,DESC)) return SUMX(FILTER(a,Stores[Magasin] = MAX(Stores[Magasin])),[rank])
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Thank you for your reactivity and your expertise.
I still have to do some tests to make sure everything is ok, but it seems to be working.
Just one question, is it normal to have to apply such a complex formula for a simple rank ?
Thanks again
- v-deddai1-msft5 years ago
Community Support
Hi Anonymous ,
As far as I concerned, Rankx measure the hard part in dax to understand. You can learn more about it by link provided by amitchandak. Maybe it's not the best way, but it's the best way I can write.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai