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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
keknight
Frequent Visitor

Yet another ranking question

I have a large table of data, separated by subject areas (100 rows per subject). The data has been scored by subject according to two scoring methods.  Here's a very abbreviated sample:

 

SubjectInstitutionScore 1Score 2
S1I110030
S1I250080
S1I3655
S1I43231
S2I12655
S2I27566
S2I38154
S2I49623
S2I55586
S3I24471
S3I33655
S3I444538
S3I52812

 

I'm trying to create a graph that will allow me to display this data by "Top N" institution. BUT, I want to show "Top N" rankings according to both ranking systems simultaneously *in the same graph*, so that if an institution is ranked highly according to one score but not another, it still shows up in the graph. 

 

Using the above example, if I showed the top 2 institutions according to Score 1, I'd like to simultaneously see the top 2 institutions according to Score 2 in the same graph, even if one institution didn't rank in the top 2 for both Scores.

 

Is there a visualization that will allow me to do this?

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @keknight,

 

Please create below measures:

Sum1 = SUM(Institution[Score 1])
Sum2 = SUM(Institution[Score 2])

Ranking1 = RANKX(ALL(Institution),[Sum1],,DESC,Dense)
Ranking2 = RANKX(ALL(Institution),[Sum2],,DESC,Dense)

Top2 = IF([Ranking1] <=2 || [Ranking2] <=2,1,0)

Add measure [Top2] into visual level filter, set its value to 1.

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @keknight,

 

Please create below measures:

Sum1 = SUM(Institution[Score 1])
Sum2 = SUM(Institution[Score 2])

Ranking1 = RANKX(ALL(Institution),[Sum1],,DESC,Dense)
Ranking2 = RANKX(ALL(Institution),[Sum2],,DESC,Dense)

Top2 = IF([Ranking1] <=2 || [Ranking2] <=2,1,0)

Add measure [Top2] into visual level filter, set its value to 1.

1.PNG

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Phil_Seamark
Employee
Employee

There could be a visualisation that helps but can you please provide more detail on your example.

 

Such as what your expected output might look like in data form?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

example.jpg

Sure! I'm able to do exactly what I want using Pandas (Python). See above example, where some datapoints have both scores plotted, and some only have one. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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