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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Ramachandran
Helper III
Helper III

Rankx with multiple filter problem

Hi,

 

I'm facing problem with RANKX() field. My source data is look like,

Ramachandran_0-1624613559451.png

My code - RANKX(
FILTER(ALL('Country Detail'[Country]),
NOT ISBLANK([Debit]))
, [Credit])

The rank it is showing 1 for each row.

I need output is like 

Ramachandran_1-1624614694405.png

The Rank column should be calculated based on Credit field and not allow any blank values like country, state and debit columns.
some one assist me how do I handle it.


thanks,

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

https://www.dropbox.com/s/cmg4gbsdy54gi10/RankX_file.pbix?dl=0 


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.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

https://www.dropbox.com/s/cmg4gbsdy54gi10/RankX_file.pbix?dl=0 


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.

Hello @Jihwan_Kim 

 

Just saw your .pbix file. 

 

In RankX, the row context is on the column given with the table submission, or when the table has just a single column. 

Kumail_0-1624625568253.png

In the current file, the whole table is provided in the RankX function and yet the ranking is done by just State and not by country in the visualization is just a bit confusing. 

 

Kumail_1-1624625782321.png

Kumail_2-1624625912294.png

 

This is really confusing the things. Any help would be highly appreciated!!

 

Thanks,

Kumail Raza

 

 

Kumail
Post Prodigy
Post Prodigy

Hello @Ramachandran 

 

If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick solution.

 

Regards

Kumail Raza
Kumail Raza

I shared pbix file location is below

https://drive.google.com/file/d/1v_9WpcrmR_7YgOVUORlyTpyB7ki8_8wo/view?usp=sharing

 

Please check and let me know.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.