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! Learn more

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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