Forum Discussion

vrocca's avatar
vrocca
Icon for Advocate IV rankAdvocate IV
10 years ago
Solved

How to show/hide points on a map based on slicer

Hi all - I'm trying to create a Map chart, using a field with Lat,Long coordinates to plot my values, and I only want to show the points when the data is filtered to a State. Is there a DAX formula t...
  • Greg_Deckler's avatar
    10 years ago

    Perhaps a little tricky. Create a measure IsFiltered like:

     

    IsFiltered = ISFILTERED(Cities[State]) * 1.

    Change the type of the measure to Whole Number.

     

    Add "IsFiltered" to your Visual Level Filters. 

     

    Set it to only display when IsFiltered = 1.

  • v-micsh-msft's avatar
    v-micsh-msft
    10 years ago

    Hi vrocca,

     

     

    I checked the page you shared, but the page showing me a Message not found information. Would it be available for you to share the filter configuration with a screenshot in your next post?

     

    If the Map Chart already has one filter applied, then we may consider change the measure with the formula below:

    ISfiltered = IF(

                        ISFILTERED(Table[State]),

                            IF(HASONEFILTER(Table1[State]),

                                 0,

                                 1),

                        0)

    Then, add the ISfiltered to Map Chart Visual level filter, and apply filter when the value is set to 1. See if this would make the slicer work.

    And if any further help needed, please feel free to post back.

    Regards