Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.