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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
mpicca13
Resolver IV
Resolver IV

DAX Dynamic RANKX not changing Axis values

I'm currently working on a Covid-19 Dashboard and I have created a measure which ranks the top 10 counties in the US by new confirmed cases for the day.

 

The measure for new confirmed cases is : 

DoD Confirmed Case Count Change = [Confirmed Cases for Current Day] - [Confirmed Cases Yesterday]
 
My Rank Measure is:
Top Counties =
VAR RankByCounty = RANKX( ALLSELECTED( Region[County & State]), [DoD Confirmed Case Count Change], , DESC)

RETURN
CALCULATE(
    [DoD Confirmed Case Count Change],
        FILTER( Region, RankByCounty <= 10 )
)  
 
Now when I select a date from the past, all of my [DoD Confirmed Case Count Change] values will change accordingly by the but the Axis values Region[County & State] will remain in place in the visual, this leads to the same county and region axis values but whichever county is not placed in top 10 for the selected prior date that is currently palced top 10 for the current date  will show a DoD case count value of 0.
 
See below images for reference:
 
Visual with date filter set to today:
Capture.PNG
 
Visual with date filter set to 4/03/2020:
Capture1.PNG 
 
I need te Axis values to change accordingly showing the corresponding DoD Case Count values
I feel that this issue lies in my Rank formula.
 
1 ACCEPTED SOLUTION
mpicca13
Resolver IV
Resolver IV

I have resolved the problem.

The issue was not in the DAX formula, it was in the visual interaction.

The interaction was set to "Highlight" .

I have changed it to "Filter" and now it works as intended.

View solution in original post

1 REPLY 1
mpicca13
Resolver IV
Resolver IV

I have resolved the problem.

The issue was not in the DAX formula, it was in the visual interaction.

The interaction was set to "Highlight" .

I have changed it to "Filter" and now it works as intended.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.