The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to 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 :
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
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
Hi there! Thank you for your answer! Of course here it is, my data looks like that :
Region | Country | Question 1 | Question 2 | Question 3 |
Africa | Algeria | 3 | 4 | 1 |
Asia | China | 5 | 4 | 1 |
Europe | France | 2 | 5 | 4 |
Europe | Germany | 4 | 1 | 2 |
North America | Canada | 1 | 2 | 3 |
Oceania | Australia | 5 | 4 | 4 |
South America | Argentina | 3 | 3 | 4 |
South America | Brazil | 2 | 5 | 5 |
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 :
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