Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

rank without null values

Hi everybody . 

 

I have a little problem with the rank when we have a null value it considers 0 as a 1st rank

how not to take null values

 

measure : 

 

 resultat : 

 thank you in advance 

 

  • Hi Anonymous ,

     

    We can try to use the following measure to meet your requiremnet:

     

    Range Total =
     (
        RANKX (
            FILTER (
                ALLNOBLANKROW ( DATA[Libellé Entité] );
                NOT ISBLANK (
                    CALCULATE (
                        [Coût Total N]
                    )
                )
            );
            [Coût Total N];
            ;
            ASC;
            DENSE
        )
    )

     

    If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


    Best regards,

     

     

3 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Community Support

    Hi Anonymous ,

     

    We can try to use the following measure to meet your requiremnet:

     

    Range Total =
     (
        RANKX (
            FILTER (
                ALLNOBLANKROW ( DATA[Libellé Entité] );
                NOT ISBLANK (
                    CALCULATE (
                        [Coût Total N]
                    )
                )
            );
            [Coût Total N];
            ;
            ASC;
            DENSE
        )
    )

     

    If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


    Best regards,

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable
      • v-lid-msft's avatar
        v-lid-msft
        Community Support

        Hi Anonymous ,

         

        Sorry for our late in response, firstly, if your screen shot contain any confidential information or real data, we suggest you to delete it.

         

        Do you mean the "Range Total" should be 31 instead of 29 in the fourth screenshot? What is the formula of "Rang"?


        Best regards,