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

Rank as a column in order to filter

I have a table that has a long list of customers and I have a column that has revenue. I need to rank the total revenue for each customer and then filter it to show only the top 15 customers. I created a measure that can successfully rank the customers based on revenue: 

 

Rank = rankx(all('Customer List'[Customer Name]), calculate(sum('Settlements'[Revenue])))

 

But I can't use that measure as a filter, and if I try to use that same formula as a column, it gives incorrect data. How can I create a column that will use those ranks in order to filter it so I can show only the top 15 as a report level filter? Please help! 

1 ACCEPTED SOLUTION
Drewdel
Advocate II
Advocate II

This is actually something you can do without a ranking measure or column.  Click the table and select the customers in the 'Visual level filters' pane, change the 'Filter Type' to 'Top N', in the 'Show items:' select 'Top' and input 15 in the text box, and lastly drag the Revenue column (or summed measure: TotalRevenue = SUM('Settlements'[Revenue])) into the 'By value' section and voila! 

Choosing 'Top' will show the Customers with the highest revenue and 'Bottom' by the lowest revenue.

Hope that helps.  I would upload an example image but it won't let me for some odd reason.

View solution in original post

1 REPLY 1
Drewdel
Advocate II
Advocate II

This is actually something you can do without a ranking measure or column.  Click the table and select the customers in the 'Visual level filters' pane, change the 'Filter Type' to 'Top N', in the 'Show items:' select 'Top' and input 15 in the text box, and lastly drag the Revenue column (or summed measure: TotalRevenue = SUM('Settlements'[Revenue])) into the 'By value' section and voila! 

Choosing 'Top' will show the Customers with the highest revenue and 'Bottom' by the lowest revenue.

Hope that helps.  I would upload an example image but it won't let me for some odd reason.

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.