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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

RANK with multiple categories which is dynamic with filters

Hi

 

I cant seem to get the rank calculation to work for my data - im pretty new to PowerBI and an avid googler 🙂

 

I am trying to RANK parentbank per CalendarWeek, by Available Cash in DESC order. The RANK must be dynamic (work with filters - calendar week, country).

 

Caledar Week filter will always be a single-select, country filter could by mutiple.

 

Here is a sample of the data, there are no relationships, its a flat file. 

 

MelissaBee1986_0-1605000365699.png

Expected Result : for each date, show me the DESC order of 'Parent Banks' ranked by 'Available Cash' Value

 

ie. 

 

CalendarWeekParentBankCountryAvailable CashRank
12/12/20AA30002
12/12/20BA50001
12/12/20CB20003
24/5/19AA90002
24/5/19BA2003
24/5/19CB366666661
2 REPLIES 2
DataInsights
Super User
Super User

@MelissaBee1986,

See the link below for a useful explanation of various RANKX uses. In addition, you appear to have created a calculated column. Because you want the range to be dynamic (work with filters), you must create a measure.

https://powerpivotpro.com/2015/06/rankx-apalooza-within-and-across-groups-with-filters-etc/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thank you for getting back to me 😊 I managed to calculate RANK with a measure!

 

The reason why I created a column before is because I wanted to create a category after which details  ParentBank + Others if over RANK 20.(I will look into other ways around this).

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.