Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Shape Map Advanced Filtering with cards & slicer

Hi,

I’m new to this forum and would appreciate your help. I’ve built a report with a shape map, a dropdown slicer and several cards.

The slicer allows to select a year and pressing a state shows values in cards.

I only have one table which has all the information I need to show in the cards.

Among many other columns and rows, my table is basically as follows:

 

When I select a State, everything works fine (since they all appear on the shape map), but things aren't working when I click outside the area of States. I would like data returned for COUNTRY in cards when no state is selected. In other words to show as default values.  I know I must apply some advanced filter but have no idea how to do it.

 

Thanks

  • Hi Anonymous,

     

    I made one sample for your reference.

     

    We can create a measure as below to work on it.

     

    Measure = var _Catoosa = CALCULATE(SUM(Sheet1[Total]),FILTER(Sheet1,Sheet1[_State]= "Catoosa"))
    return
    IF(ISFILTERED(Sheet1[_State]),CALCULATE(SUM(Sheet1[Total])),_Catoosa)

     

     

     

     

     

    Regards,

    Frank

3 Replies

  • v-frfei-msft's avatar
    v-frfei-msft
    Community Support

    Hi Anonymous,

     

    I made one sample for your reference.

     

    We can create a measure as below to work on it.

     

    Measure = var _Catoosa = CALCULATE(SUM(Sheet1[Total]),FILTER(Sheet1,Sheet1[_State]= "Catoosa"))
    return
    IF(ISFILTERED(Sheet1[_State]),CALCULATE(SUM(Sheet1[Total])),_Catoosa)

     

     

     

     

     

    Regards,

    Frank

    • Anonymous's avatar
      Anonymous
      Not applicable

      Worked fine, except need to format results . I tried severall combinations with Format function #,##0 but keep getting an error message. Any ideas?

       

      Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    My approach to formating numbers in the card was all wrong. When using measures to fill a card, one must select the measure in the fields pane, and then go to format in visual tools and choose the format. Its quiete  simple yet took me a while to find out. Hope this will help others.