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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Surekha_PM
Helper II
Helper II

Change Map Color as per the Pincode

Hello Everyone,

I am trying to create a map by pincode, and I am adding a condition to change the color of the map as per the condition. The Condition is working fine when the map is zoomed out. But When I click on any specific pincode, the color is default Blue. What I need to do is ensure that when a user selects any pincode from the slicer, the color remains the same.

Conditional formatting is working fine in this view:

Surekha_PM_0-1722583058021.png


When I select a pincode, the color changes to default Blue. It should remain the same as per the above graph.

Surekha_PM_1-1722583124388.png

Can anyone suggest if this will be fixed or not?

Regards,
Surekha



1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Surekha_PM -Hope you are using Azure map and  you should be able to maintain consistent conditional formatting in your Azure Maps visual in Power BI, even when zooming in or selecting specific pincodes. can you try to add conditional formatting at bubble layer level and also use conditional fomatting type with Field values instead of rules or gradient.

 

rajendraongole1_2-1722662558620.png

rajendraongole1_3-1722662648715.png

 

 

Hope it helps.

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
sroy_16
Resolver II
Resolver II

Hello,

 

Try using this approach and see if it works

Set Up Conditional Formatting in Your Map Visual:

Create a Measure for Conditional Formatting:
To ensure that colors are correctly applied based on conditions even when zoomed in, create a measure that determines the color. For example:

Pincode Color =
SWITCH(
TRUE(),
[Your Measure] > Threshold1, "Color1",
[Your Measure] <= Threshold1 && [Your Measure] > Threshold2, "Color2",
"ColorDefault"
)

Replace [Your Measure], Threshold1, Threshold2, and the color values with your actual measure and conditions.
Add Conditional Formatting to the Map:

Using Color By Field:
Add a map visual to your report and include the pincode field as well as any measure you are using for coloring.
In the Visualizations pane, go to the Format options (paint roller icon).
Expand the Data colors section.
Choose to format colors based on your measure or column. Use the measure you created (Pincode Color) to control the colors based on conditions.
Handle Selection and Filtering:

Ensure Consistent Formatting on Selection:
In the Format pane for the map visual, go to Data colors.
Ensure that the colors for each pincode are set to be conditional based on your measure or field, and not set to default colors.
Slicer Configuration:
If you have a slicer for pin codes, ensure it’s correctly filtering the data used by the map visual. When a user selects a pincode, the map should filter to that pincode and apply the same conditional formatting.

Check Map Settings:

Ensure that you don’t have any settings in the map visual that could override your conditional formatting when zoomed in. Check for any options related to color handling or default settings.

 

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

rajendraongole1
Super User
Super User

Hi @Surekha_PM -Hope you are using Azure map and  you should be able to maintain consistent conditional formatting in your Azure Maps visual in Power BI, even when zooming in or selecting specific pincodes. can you try to add conditional formatting at bubble layer level and also use conditional fomatting type with Field values instead of rules or gradient.

 

rajendraongole1_2-1722662558620.png

rajendraongole1_3-1722662648715.png

 

 

Hope it helps.

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.