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

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

Reply
kobkabnaja
Helper II
Helper II

Create one filter to get two rank

Hi community,

 

I am creating a comparison dashboard for two state,  following this link (https://www.youtube.com/watch?v=vzI9T3Wdpak&t=300s). The dashboard uses MAX and MIN values to filter two values for the card. I successfully follow the tutorial, but I am trying to extend it by showing the rank of both selected states. When I set the MAX (TEST), I get the correct rank. However, when I set the MIN (TEST2), the ranks for both states disappear. Ideally, I want to show both selected ranks at the same time (please see the attached).

 

Any suggestions or edits to fix this would be greatly appreciated!

 

Thank you,
K.

 

Only one state selectedOnly one state selectedRanks disappear when two states selectedRanks disappear when two states selectedValue for the first stateValue for the first stateValue for the second stateValue for the second stateLabel for the first stateLabel for the first stateLabel for the second stateLabel for the second stateTry to get a rank for the first stateTry to get a rank for the first stateTry to get a rank for the second stateTry to get a rank for the second state

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@kobkabnaja This is how should address this, use Rank 1 and Rank 2 in the visual, Tweak the solution as  you see fit.

 

 

 

Rank Measure = 
RANKX (
   ALL ( 'migration'[Name] ),
   CALCULATE ( SUM ( 'migration'[NETFLOW_TOT] ) ),
   ,
   DESC
)

Rank 1 = 
VAR __Max = MAX ( 'migration'[Name] ) 
RETURN
CALCULATE ( 
   [Rank Measure],
   'migration'[Name] = __Max 
)


Rank 2 = 
VAR __Min= MIN( 'migration'[Name] ) 
RETURN
CALCULATE ( 
   [Rank Measure],
   'migration'[Name] = __Min
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@kobkabnaja good to know. Cheers!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@kobkabnaja This is how should address this, use Rank 1 and Rank 2 in the visual, Tweak the solution as  you see fit.

 

 

 

Rank Measure = 
RANKX (
   ALL ( 'migration'[Name] ),
   CALCULATE ( SUM ( 'migration'[NETFLOW_TOT] ) ),
   ,
   DESC
)

Rank 1 = 
VAR __Max = MAX ( 'migration'[Name] ) 
RETURN
CALCULATE ( 
   [Rank Measure],
   'migration'[Name] = __Max 
)


Rank 2 = 
VAR __Min= MIN( 'migration'[Name] ) 
RETURN
CALCULATE ( 
   [Rank Measure],
   'migration'[Name] = __Min
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Thank you so much. This works like a charm!!!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors