The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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;
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.
For those
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:
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:
Map each province to its region in your data model.
Create a DAX column assigning a unique value or hex code per region.
Use this column as the Value in the Shape Map visual.
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!
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?