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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ero
Frequent Visitor

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:

 

Capture.JPG

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

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @ero,

 

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)

 

 

Capture.PNG

 

 

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
ero
Frequent Visitor

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.

v-frfei-msft
Community Support
Community Support

Hi @ero,

 

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)

 

 

Capture.PNG

 

 

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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

 

Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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