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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jiexika24
Frequent Visitor

DAX Measure to Show State on Map for non-State Location

Hello, I have a slicer that lists the training host. Most of the host sites are USA states, but there are some that are not. I'd like to attribute these non-states to a state (e.g., if 'Ascent', have the map show the state of 'Indiana'). 

 

Here's what the map looks like when I select the non-state, 'Ascent':

 

Ascent.png

 

Here's what I want the map to look like: 

 

goal.png

 

 

I tried this DAX measure but seeking any revisions to it so that the map displays the assigned state. Thanks so much.

 

MapStateShown =
IF (
    ISFILTERED('Table Name'[Host]),
    SWITCH (
        SELECTEDVALUE('Table Name'[Host])
        "Ascent", "Indiana",
        "National", "United States of America",
        SELECTEDVALUE('Table Name'[Host])
    ),
    BLANK()
)
 
 
2 REPLIES 2
jiexika24
Frequent Visitor

Hi @Anonymous, thank you so much for this edit. 
 

Unfortunately, the map still returns a blank US map and not the state of Indiana, even after correctly entering my table name and not getting any errors in red font.

 

Perhaps there a different way to go about this? Really appreciate the help.

Anonymous
Not applicable

Hi @jiexika24 

 

Here's a revised version of your DAX measure that should help achieve your goal:

MapStateShown = 
IF (
    ISFILTERED('Table Name'[Host]),
    SWITCH (
        TRUE(),
        SELECTEDVALUE('Table Name'[Host]) = "Ascent", "Indiana",
        SELECTEDVALUE('Table Name'[Host]) = "National", "United States of America",
        SELECTEDVALUE('Table Name'[Host])
    ),
    BLANK()
)

 

 

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.