Forum Discussion
Arnault_
1 year agoResolver III
Rankx ignoring 1 column
Hi All, I have created a measure wich worked well until I decided to add one column in the table below (the last column). Now the Rankx measure interacts with the last columns. Could you help me fix...
- 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.
shreebidwai
1 year agoFrequent Visitor
the new column affects the ranking unexpectedly, consider explicitly excluding it from the calculation using REMOVEFILTERS or KEEPFILTERS to refine the ranking context.
RANKX (
REMOVEFILTERS ( XN_ART_DEPOT[LastColumn] ),
[Volumes moy. stockés],
,
DESC
)
This adjustment should help isolate the RANKX calculation from the impact of the newly added column. Let me know if further clarification is needed!