Forum Discussion
Rankx ignoring 1 column
- 1 year ago
You're right Arnault_ , I just updated the measure:
Product ranking (volumes moy. stockés) = VAR fx = [Volumes moy. stockés] RETURN IF ( fx = 0, BLANK (), RANKX ( ALL ( XN_ART_DEPOT[ART/VER], XN_ART_DEPOT[Dubai_stock] ), [Volumes moy. stockés], , DESC ) ) - 1 year ago
Hi All,
I finally figured this out. Here is the correct formula:
Product ranking (volumes moy. stockés) v 3 = VAR fx = [Volumes moy. stockés] RETURN IF ( fx = 0, BLANK (), RANKX ( ALLSELECTED ( XN_ART_DEPOT[ART/VER], XN_ART_DEPOT[Dubai_stock] ), [Volumes moy. stockés],, DESC ) )Thank you for your help.
Hey Bibiano_Geraldo ,
I also found a solution by using ALLSELECTED, but applying the same logic. Which solution you recommand to use? Mine or yours?
Hi Arnault_, It depend on your logic:
Using ALL: This approach ensures that the ranking is calculated by ignoring the “Dubai_stock” column entirely. It is straightforward and effective if you want to exclude specific columns from the ranking calculation.
Using ALLSELECTED: This approach respects the current context and filters applied to the data, which can be useful if you want the ranking to be dynamic based on user selections in the report. It can be more flexible in interactive reports where users might apply different filters.
If your report requires dynamic interaction and you want the ranking to adjust based on user selections, go with ALLSELECTED. If you need a static ranking that ignores specific columns, use ALL.
- Arnault_1 year agoResolver III
Thanks that's extremely useful !!! I will follow your advise.