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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.