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
savark
Regular Visitor

Shape Map Filtering

Hi everyone,

 

I'm very new to Power Bi and need your help. I have created a shape map that is linked with real time data and collects the answers from a microsoft form through an automated cloud flow. The answers from the questions on the form range from 1 to 5 and the map is color graded (getting more intense when the grade is higher). The problem is : I can't filter my questions on the map, I can only choose one question. I would love to add a slicer where I could choose which question I want to show on the map and it would automatically show me, while also updating the slicer on the right (check picture).

 

I also tried to create a dynamic measure something like this :

 

CO2PlanImplementationGrade = MAX('RealTimeData'[CO2 Plan Implementation])
CO2PlanUpdateGrade = MAX('RealTimeData'[CO2 Plan Update])
ContactPoliticsGrade = MAX('RealTimeData'[Contact Politics])

 

and this :

 

SelectedQuestionGrade =
SWITCH(
TRUE(),
SELECTEDVALUE('QuestionSelector'[QuestionName]) = "CO2 Plan Implementation", [CO2PlanImplementationGrade],
SELECTEDVALUE('QuestionSelector'[QuestionName]) = "CO2 Plan Update", [CO2PlanUpdateGrade],
SELECTEDVALUE('QuestionSelector'[QuestionName]) = "Contact Politics", [ContactPoliticsGrade],
BLANK() // Default if no question is selected or if there is an invalid

 

 selection
)

 

but it simply doesn't work and displays an error message on the shape map. I also need to let you know that I can't create a new table (the button is not active), probably because I am working with real time data. 

 

I am completely new to this and working my way with tutorials I find online but I would really appreciate your help!


Thank you

 

 

Screenshot 2024-08-14 135608.png

1 ACCEPTED SOLUTION

Hi @savark 
I don't have a needed staff for the shape map so I will explain just the logic ( it works with the map in the same way).
To have the option of slicing like :

Ritaf1983_0-1723782784719.png

Ritaf1983_1-1723782811637.png

You need to unpivot the table :

Ritaf1983_2-1723782899436.png

After you'll have a "vertical" table like :

Ritaf1983_3-1723782948317.png

The Question will be a column and you will have the option to use it as a slicer

The pbix with the example is attached

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @savark 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi there! Thank you for your answer! Of course here it is, my data looks like that :

RegionCountryQuestion 1Question 2Question 3
AfricaAlgeria341
AsiaChina541
EuropeFrance254
EuropeGermany412
North AmericaCanada123
OceaniaAustralia544
South AmericaArgentina334
South AmericaBrazil255



For now on my map, I can only visualize question 1. I want to be able to add a filter where I could pick which question would appear on the map with the correct color saturation (light for 1, dark for 5)

 

Thank you again!

Hi @savark 
I don't have a needed staff for the shape map so I will explain just the logic ( it works with the map in the same way).
To have the option of slicing like :

Ritaf1983_0-1723782784719.png

Ritaf1983_1-1723782811637.png

You need to unpivot the table :

Ritaf1983_2-1723782899436.png

After you'll have a "vertical" table like :

Ritaf1983_3-1723782948317.png

The Question will be a column and you will have the option to use it as a slicer

The pbix with the example is attached

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

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.

Top Solution Authors