Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
dbeaton41
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

Zubair_Muhammad
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

Please try my custom visuals

View solution in original post

5 REPLIES 5
Zubair_Muhammad
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

Please try my custom visuals
Anonymous
Not applicable

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

 

 

Thanks Nathan ! That works perfectly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.