Forum Discussion

badboy66's avatar
badboy66
New Member
7 years ago
Solved

Problem with rankx function

Dear all,   I've been thinking for hours now on the following problems but I couldn't come to a solution so far:     Ranking is done by the following formulas:   2_1_Test Ranking_UR_Test...
  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi badboy66,

     

    Here I update the formula as below.

     

    2_1_Test Ranking_UR_Test 2 = IF(IF(ISBLANK(Gesamtwerte[1_1_1 UR final_Test]),BLANK(),RANKX(ALL(Gesamtwerte),Gesamtwerte[1_1_1 UR final_Test],,ASC,Dense))<>BLANK(),RANKX(ALL(Gesamtwerte),IF(ISBLANK(Gesamtwerte[1_1_1 UR final_Test]),BLANK(),RANKX(ALL(Gesamtwerte),Gesamtwerte[1_1_1 UR final_Test],,ASC,Dense))))

     

    For the measure 2_2_2 ranking_UR increase final_Test, based on my test. I cannot achieve your goal here. 

     

    Regards,

    Frank

  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi badboy66,

     

    Based on my test, we can create a calculated table here. And create relationship between Gesamtwerte and the new table based on ID.

     

     

    Table 2 = SUMMARIZE(Gesamtwerte,Gesamtwerte[ID],Gesamtwerte[Name])

     

    Then we can create a measure to get the rank correctly.

     

    new rank = IF(ISBLANK([1_2 increase UR_Test]),BLANK(),RANKX(ALL('Table 2'),[1_2 increase UR_Test],,DESC,Dense))

     

    For more details, please check the pbix as attached.

     

    https://www.dropbox.com/s/08yu8jmaaod8hnn/Problem%20with%20rankx%20function.pbix?dl=0

     

    Regards,

    Frank