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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Microsoft Employee
Microsoft 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
Microsoft Employee
Microsoft 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
Microsoft Employee
Microsoft 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors