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

Exclude ranking for blank values with multiple columns in a table.

Hello,

 

I used Rankx function to calculate the ranking for a data.  i want to exclude the empty fields so the ranking calculates based on only the fields that has data in them.(total Revenue measure). 

Dax that am using is 

harip1_1-1617600637142.png

 

harip1_3-1617601329773.png

 

 

But if we want to do ranking for multiple column (from another lookup table)
How do we handle that?

Product Rank uses: Ranking by product measure

Company Rank uses:  Ranking by Sales company measure.

 

All i want to show ranking for product , for sales company, of total revenue by all company group,company code, product facility.

as below table.

harip1_2-1617601137324.png

 

its a very sensitive data that i cannot share much. 

any help is much appreciated.

Thanks,

Pria

 

 

 

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi, @harip1 

Please correct me if I wrongly understood your question.

please try to write something like below measure for considering all dim tables.

 

Rank by all dimtables =
IF( not ISBLANK([Amount Total]),
RANKX( ALL(yourmainfacttable), [Amount Total], , DESC), BLANK())
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.