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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
BozPLR
Frequent Visitor

Two locations in one row on a single map?

I am working with data that has two important related locations in each row. I would like to have both locations dropped on a map in two different colors. I am unable to map more than 1 location to the map visual. Is there a way to do this while also maintaining the link between the map and related visuals?

 

I am attaching mock data that illustrates the issue. I would like both the Store and the Warehouse locations mapped on the map. I cannot use the Legend to differentiate them because they are different columns, which seems to be the common suggestion in the forum posts I searched. 

 

ItemQuantityWarehouseStorePrice
Sweater1Owensboro, KYLexington, KY20
Jeans1Owensboro, KYLouisville, KY30
Shoes1Pikeville, KYLouisville, KY25
Sweater1Owensboro, KYBowling Green, KY20
Jeans1Owensboro, KYBowling Green, KY30
Sandals1Pikeville, KYCovington, KY

15

 

BozPLR_0-1743446772244.png

The above image shows only the Store locations being mapped. I basically just want to also map the Warehouse locations in red while also maintaining the the ability to click on a Warehouse in the table and have the entire page filter to items associated with that warehouse. 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You achieve that by unpivoting your data to bring it into usable format

lbendlin_0-1743455529881.png

 

Then you can use the location type for the pin coloring.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCi5PTSxJLVLSUTIEYv/y1LzipPyifB0F70gg3ye1IjMvvSQ/D8o3MlCK1YlW8kpNzCvGpSW/NLO4LDMnJxUqYAzRE5yRnwrTE5CZnYqsBEOPkSlED17HOeWX5wBdp+BelJpKggOxaYO5MTEvJTEHlyud88tQAsMQ6MhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Item = _t, Quantity = _t, Warehouse = _t, Store = _t, Price = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Item", "Quantity", "Price"}, "Location Type", "Location")
in
    #"Unpivoted Other Columns"

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

You achieve that by unpivoting your data to bring it into usable format

lbendlin_0-1743455529881.png

 

Then you can use the location type for the pin coloring.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCi5PTSxJLVLSUTIEYv/y1LzipPyifB0F70gg3ye1IjMvvSQ/D8o3MlCK1YlW8kpNzCvGpSW/NLO4LDMnJxUqYAzRE5yRnwrTE5CZnYqsBEOPkSlED17HOeWX5wBdp+BelJpKggOxaYO5MTEvJTEHlyud88tQAsMQ6MhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Item = _t, Quantity = _t, Warehouse = _t, Store = _t, Price = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Item", "Quantity", "Price"}, "Location Type", "Location")
in
    #"Unpivoted Other Columns"

Unpivoting got me where I needed to be. I did not understand the code snippet fully, but searching other resources for unpivoting was helpful. Thank you so much!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.