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
Xynics
Frequent Visitor

Bottom N of Top N2

Hi,

 

I have a list of responders to a survey which I have count(responder) shown as % of total by "location" name in a Matrix.

 

I want to display the top 100 locations in blocks of 25, ordered by the % responses in descending order.

What I want to do is select the Top 25 into one matrix, then the Bottom 25 of the Top 50 into the next matrix, etc.

 

I've been trying to use RANKX to order by % response DESC and select each group of 25 by >=1 and <=25, >=26 and <=50 etc.

 

I am sure someone else has likely come across this and there's a really simple solution, but I just can't see it!

 

Can anyone help?

 

Thanks

Mike

1 ACCEPTED SOLUTION

Hi @Xynics

 

get the file: https://1drv.ms/u/s!AiiWkkwHZChHj0UEUdLX3DXEKpID

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

7 REPLIES 7
LivioLanzo
Solution Sage
Solution Sage

@Xynics

 

Are you able to post sample data?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Hi, this is a sample of the data I am trying to display.

 

Location% responders
The University Of Nottingham6.23%
Nottingham Trent University3.46%
Keele University3.44%
University Of Birmingham3.34%
Coventry University3.28%
Cardiff University3.08%
Kings's College London2.87%
Liverpool John Moores University2.51%
University College London (UCL)2.47%
Manchester Metropolitan University2.36%
University Of Leicester2.31%
Newcastle University2.26%
University Of Sheffield2.10%
University Of Glasgow2.00%
Southampton Solent University1.90%
University Of Derby1.82%
University Of Dundee1.82%
Loughborough University1.80%
De Monfort University Leicester1.70%
Leeds Beckett University1.64%
University Of Manchester1.57%
University Of Salford1.54%
Sheffield Hallamshire University1.51%
University Of The West Of England1.46%
Heriot-Watt University1.41%

 

And assuming I was trying to do top 5 first, then 5-10 next, then 10-15 next, I am wanting to display it in PowerBI like this as seperate tables;

Location% responders Location% responders Location% responders
The University Of Nottingham6.23% Cardiff University3.08% University Of Leicester2.31%
Nottingham Trent University3.46% Kings's College London2.87% Newcastle University2.26%
Keele University3.44% Liverpool John Moores University2.51% University Of Sheffield2.10%
University Of Birmingham3.34% University College London (UCL)2.47% University Of Glasgow2.00%
Coventry University3.28% Manchester Metropolitan University2.36% Southampton Solent University

1.90%

 

 

Hi @Xynics

 

get the file: https://1drv.ms/u/s!AiiWkkwHZChHj0UEUdLX3DXEKpID

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Hi,

 

Thanks for the sample, however I think I may have mislead slightly.  My data is not already aggregated.

 

My data is in a format for example like this;

 

Responder IDUniversity
1Nottingham
2Sheffield
3Leicester
4Leicester
5Leicester
6Nottingham
7Sheffield
8Nottingham
9Nottingham
10Sheffield
11Sheffield
12Sheffield
13Sheffield
14Nottingham

 

I am then using a Matrix to count the Responder ID's for each University location, so I don't have a Measure that is the count of responders.

 

I guess I need a new measure that counts the responders to then apply the rank to that, but I also still need to be able to apply slicers etc.

 

Mike 

Hi @Xynics,

 

looks like you just need to change the measure to a count  of Respondend ID instead of the sum I used in my file

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Thanks for your help, I've managed it using your example and changing the sum to a count.

Couldn't see it yet so simple.

Yep. Just create a rank column and then use that column in your visual level filters to select what ranges you want to show using advanced filtering.

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.