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 September 15. Request your voucher.
Hi
Think this should be a simple query but just want to follow best practice....
I have the following data structure
Location ID | Name | Address | Region | ZIP/Post Code | Assigned Staff ID |
1001 | A | 1 A Road | AL | 123456 | 101 |
1002 | B | 2 B Road | AK | 234567 | 101 |
1003 | C | 3 C Road | AK | 234568 | 102 |
... | ... | ... | ... | ... | ... |
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!
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!!
Proud to be a Super User! | |
User | Count |
---|---|
60 | |
55 | |
53 | |
49 | |
30 |
User | Count |
---|---|
179 | |
87 | |
71 | |
48 | |
46 |