Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi powerbi wizards,
I'm using the Map visualisation, works pretty well. I'm importing data from Google Analytics and showing sessions per country on the map. So far, so good.
What I'd also like to do is colour countries based on whether they have a certain value in my dataset. In this case it would be three different values, 'active', 'in progress' and 'nothing planned' or similar. These would be represented on the map with three different colours.
I'd just like to know whether I can do this? Thanks in advance.
Solved! Go to Solution.
@JonSwed - Yes, you should be able to put that in the Legend if it is a column. If it is a measure, use the Disconnected Table Trick - In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...
@JonSwed , check if this conditional formatting is allowed on the Map. You can create a color measure and use field option in conditional formatting
Color sales = if(AVERAGE(Sales[Sales Amount])<170,"green","red")
Color Year = if(FIRSTNONBLANK(Table[Year],2014) <=2016,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color = if(FIRSTNONBLANK(Table[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK(Table[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")
color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
@JonSwed - Yes, you should be able to put that in the Legend if it is a column. If it is a measure, use the Disconnected Table Trick - In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...
Thanks for the help guys. I was able to add the required statuses in a new column (I used the merge function to create it) and then adding these as the legend worked like a charm.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
69 | |
66 | |
51 | |
33 |
User | Count |
---|---|
114 | |
97 | |
75 | |
65 | |
39 |