Forum Discussion

dbeaton41's avatar
dbeaton41
New Member
7 years ago
Solved

Rank Multiple Measures

Hi I've searched the forums but can't find an answer to my particular question. I'm trying to rank one column against the values in other columns as shown below. I want the rank of the column Test_...
  • Anonymous's avatar
    Anonymous
    7 years ago

    dbeaton41 -

    One possibility:

     

    aTest = 
    var vTest_1 = [Test_1]
    return 1 
        + IF([vTest_1]<[Test_2],1,0) 
        + IF([vTest_1]<[Test_3],1,0) 
        + IF([vTest_1]<[Test_4],1,0) 
        + IF([vTest_1]<[Test_5],1,0)

    Cheers!

    Nathan

     

     

  • Zubair_Muhammad's avatar
    7 years ago

    dbeaton41 

     

    Another way could be

     

    Measure =
    VAR temp = { [Test_1], [Test_2], [Test_3], [Test_4], [Test_5] }
    RETURN
        COUNTROWS ( FILTER ( temp, [Test_1] <= [Value] ) )