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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
metcala
Helper III
Helper III

Creating shape map

Hi

 

Think this should be a simple query but just want to follow best practice....

 

I have the following data structure

 

Location IDNameAddressRegionZIP/Post CodeAssigned Staff ID
1001A1 A RoadAL123456101
1002B2 B RoadAK234567101
1003C3 C RoadAK234568102
..................

 

I want to be able to add a shape map showing volume by region with a legend.

 

I have created the following measures:

 

 

 

 

Count of Locations = COUNTROWS('A'[Location ID])

 

 

 

 

 

 

 

Volume by Region =
SWITCH(
   TRUE(),
   'A'[Count of Locations] = 0, "0",
   'A'[Count of Locations] < 5, "1-5",
   'A'[Count of Locations] < 10, "6-10",
   "11+"
)

 

 

 

 

I have added the following but it isn't working:

 

Location - Region

Color Saturation - Count of Locations

Legend - Volume by Region

 

As I understand I need to rework the data so Region Name/Region Count are columns. I just want to know the best way to go about this.

 

Any help would be much appreciated.

 

Thanks!

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @metcala -To create a shape map in Power BI showing the volume by region with a legend

 

-- Creating a summary table
RegionSummary =
SUMMARIZE(
'A',
'A'[Region],
"RegionCount", COUNTROWS('A')
)

-- Measure for Volume by Region
VolumeByRegion =
SWITCH(
TRUE(),
[RegionCount] = 0, "0",
[RegionCount] < 5, "1-5",
[RegionCount] < 10, "6-10",
"11+"
)

 

Create a summary table to count locations by region.Define a measure to categorize the volume by region.

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 





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

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.