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
m_wex
Helper I
Helper I

Ranking Output

Trying, unsuccessfully, to display a customer ranking list using the following:

 

Customer Ranking  =
IF(NOT(ISBLANK([Total Sales])), if([Total Sales]>0.01,RANKX(ALLSELECTED(Customers[Customer Name]),[Total Sales], , desc)))
 
The if statements are to weed out customers with no sales or those with sales under $0.01. The formula seems to work fine. But the output includes total sales of those customer who did not receive a rank. The desired result is to only display invoiced sales of customers receiving a rank.
 
Any help would be greatly appreciated.
 
Thanks,
m_wex
 
2 REPLIES 2
m_wex
Helper I
Helper I

Solved the issue by putting a filter on the field so that no blanks are displayed, But how do you prevent a rank on the total line? The table shows all the ranked customers and provides total sales. But it also shows a 1 in the ranking column. Is the function hasonevalue the one to use?

@m_wex  You can use ISINSCOPE to check the if the Customers[Customer Name] is being used for grouping in the visual. IF ( ISINSCOPE  ( Customers[Customer Name] ), [Your Measure] )

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.