cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

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_1 based on columns Test_1 to Test_5 where Test_1 to Test_5 are measures. Does anyone know if this is possible?

 

Thanks

 

YearMonthTest_1Test_2Test_3Test_4Test_5Rank_Test_1
2016March6.0983716.446276.8378735.8205976.4078694
2016April6.2007626.55366.8736626.0034216.4711364
2016May6.4313776.4651016.8479855.9080996.0822413
2016June6.0344976.5874866.9197056.2216086.4795825
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@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

 

 

View solution in original post

Community Champion
Community Champion

@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] ) )
Regards,
Zubair


View solution in original post

5 REPLIES 5
Community Champion
Community Champion

@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] ) )
Regards,
Zubair


View solution in original post

Hi, I had a simillar issue, but I wanted the Rank for all the values i.e. Test_1 to Test_5 in the above example. how to go about.

 

Thanks!  

Thanks Zubair! That also works.

Anonymous
Not applicable

@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

 

 

View solution in original post

Thanks Nathan ! That works perfectly.

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors