Forum Discussion

savark's avatar
savark
Regular Visitor
2 years ago
Solved

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

 

 

  • 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 :

    You need to unpivot the table :

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

    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

     

3 Replies

    • savark's avatar
      savark
      Regular Visitor

      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!

      • Ritaf1983's avatar
        Ritaf1983
        Super User

        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 :

        You need to unpivot the table :

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

        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