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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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