Forum Discussion

Arnault_'s avatar
Arnault_
Resolver III
1 year ago
Solved

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...
  • Bibiano_Geraldo's avatar
    Bibiano_Geraldo
    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
            )
        )
  • Arnault_'s avatar
    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.