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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Yumikang
Helper II
Helper II

How can I display different colors for different regions? 6 regions and 6 colors?

Dear ,

I desperately need help; I have 3 tables, one is the province of China; the other is the sales table of different regions; In addition, I made a new table for the provinces, and different provinces correspond to different regions; In this way, I made a one-to-many link between provinces and regions; Regions and sales tables are also linked to one-to-many; There are 6 regions; In the visual report, the region is used as a slicer; Province as location in the shape map; How do I fill the map with different colors according to different regions; For example, the East Zone is yellow, and the North Zone is blue;

please help me;

Yumikang_0-1754472513986.png

 

7 REPLIES 7
danextian
Super User
Super User

Hi @Yumikang 

If you are using the filled map visual, you may add the location as a legend. Please ensure that your data uses the correct location or geographic codes that Power BI can recognize. Otherwise, you will need to use the shapemap visual together with a shapemap file for your custom location. There are free shapemap files avilable at gadm.org. If the file you need isn't there, you will need someone to create that for you.

danextian_0-1754476634674.png

For those 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you for your reply.

I am using shape maps, and I have inserted the JSON file according to the map format.

1. I use the “provinces” in the map table as locations in the shape map, which then displays a complete map of China.

2. I treat some provinces in the map table as a large region, so I have a large region table, which is my slicer.

3. I also have a sales table showing the sales of each product in each large region.

My goal: I want to display different colors on the shape map based on different regions; East Region in blue, West Region in green, South Region in pink, North Region in yellow, other regions in orange, and special regions in white;

Can you help me with this?

The attachment is my JSON file.

 

 

Hi @Yumikang 

To color provinces based on custom regions (e.g., East = blue, West = green) using a custom JSON file with Shape Map, follow these steps:

  1. In your data table, categorize each province into a specific region (such as East, West, etc.).
  2. Create a new column that assigns hex color codes to each region using a DAX SWITCH expression.
  3. In Power BI, use this region/category as the Value in the Shape Map visual. Although Shape Map does not allow for direct color selection, it will automatically apply different colors to various categories.
  4. You can further refine the colors by adjusting the color scale in the Data colors section.

     

 

 

Hi @Yumikang 

Following up on your question about coloring provinces in a Shape Map by region.

As already explained by the @danextian @MohamedFowzan1 , you can:

  1. Map each province to its region in your data model.

  2. Create a DAX column assigning a unique value or hex code per region.

  3. Use this column as the Value in the Shape Map visual.

  4. Customize the Data colors section to match your desired scheme (e.g., East = yellow, North = blue).

This setup will ensure your map colors change according to the selected region in the slicer.


Please let me know if you need any further clarification or assistance we’re happy to help!

Hi @Yumikang 

Following up on your query about coloring provinces in a Shape Map by region.
As mentioned by @danextian @MohamedFowzan1  the approach is to map each province to its region, create a DAX column assigning a unique value or hex code per region, and use it as the Value field in the Shape Map.


You can then customize Data colors to match your preferred scheme (e.g., East = yellow, North = blue), ensuring the map updates dynamically based on slicer selection.

Let us know if you’d like further clarification or assistance.

 

If we don’t hear back, we may close this thread in line with our community guidelines, but you’re always welcome to post a new query anytime.

Thank you for being part of the Microsoft Fabric Community!

 

 

MohamedFowzan1
Responsive Resident
Responsive Resident

Hi @Yumikang 

Let me know if am missing anything here:

Couldn't you just add the Region to legend pane as well and you could even format it further with the exact color you need based on your requirement from the format visual pane.

Make sure to look into the Data Category of the column and the Map settings

Thank you for your reply.

I am using shape maps, and I have inserted the JSON file according to the map format.

1. I use the “provinces” in the map table as locations in the shape map, which then displays a complete map of China.

2. I treat some provinces in the map table as a large region, so I have a large region table, which is my slicer.

3. I also have a sales table showing the sales of each product in each large region.

My goal: I want to display different colors on the shape map based on different regions; East Region in blue, West Region in green, South Region in pink, North Region in yellow, other regions in orange, and special regions in white;

Can you help me with this?

 

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.