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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
gg80
Frequent Visitor

Display several fields in same map visualization

Hi all!

 

I'm stucked since a few days with a requeriment from a client. The issue is, they want to display in the same map visualization, several map points, which latitudes/longitudes I have in several fields in same row.  Im not able to reach this result, could someone help me with some suggestion ?

 

My data looks like:

 

PlaceORS_1_LatitudeORS_1_LongitudeORS_2_LatitudeORS_2_LongitudeORS_3_LatitudeORS_3_Longitude
1-45.591861-72.074389-40.744325-73.125101-39.80652-73.39631
2-39.156052-72.663498-38.334028-72.374917-38.33389-72.374887

 

And I need to display in same map, the ORS1, ORS2 and ORS3 points (when place 1 is selected in the filter, for example).

 

And if possible, a last question: is possible to display, in every point, the field name instead of latitude/longitude ? (this would be just a nice to have, the main requeriment is the first one)

 

Thanks in advance,

Regards

2 ACCEPTED SOLUTIONS
samratpbi
Super User
Super User

Hi, I copied the above dataset and did the below transformation in Power Query:
let
Source = Excel.Workbook(File.Contents("drive:\xxxx\xxx\xxxxxx\Map.xlsx"), null, true),  /*put your location*/
Sheet3_Sheet = Source{[Item="Sheet3",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet3_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Place", Int64.Type}, {"ORS_1_Latitude", type number}, {"ORS_1_Longitude", type number}, {"ORS_2_Latitude", type number}, {"ORS_2_Longitude", type number}, {"ORS_3_Latitude", type number}, {"ORS_3_Longitude", type number}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Place"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByEachDelimiter({"_"}, QuoteStyle.Csv, true), {"Attribute.1", "Attribute.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Attribute.1", type text}, {"Attribute.2", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Attribute.1", "LocationName"}}),
#"Pivoted Column" = Table.Pivot(#"Renamed Columns", List.Distinct(#"Renamed Columns"[Attribute.2]), "Attribute.2", "Value", List.Sum)
in
#"Pivoted Column"

Simply, first unpivot and then pivot to bring the table like below structure.

samratpbi_0-1710542269259.png

Once Done, select map visual and add Latitude and Longitude and in tooltip, add Location Name and add a slicer on Place column.

samratpbi_2-1710542371433.png

 

If this resolves your problem then please accept this as solution. 
Also you may follow my blog page (https://littlebidata.wordpress.com/) where I share some technical knowledge and different case studies on Power BI. Thanks

 



View solution in original post

HI @samratpbi , thanks! Sorry for the delay in answer, today I will test your solution, sounds as a good approach. I will let u know and mark as solved if it works, thanks again!

View solution in original post

2 REPLIES 2
samratpbi
Super User
Super User

Hi, I copied the above dataset and did the below transformation in Power Query:
let
Source = Excel.Workbook(File.Contents("drive:\xxxx\xxx\xxxxxx\Map.xlsx"), null, true),  /*put your location*/
Sheet3_Sheet = Source{[Item="Sheet3",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(Sheet3_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Place", Int64.Type}, {"ORS_1_Latitude", type number}, {"ORS_1_Longitude", type number}, {"ORS_2_Latitude", type number}, {"ORS_2_Longitude", type number}, {"ORS_3_Latitude", type number}, {"ORS_3_Longitude", type number}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Place"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByEachDelimiter({"_"}, QuoteStyle.Csv, true), {"Attribute.1", "Attribute.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Attribute.1", type text}, {"Attribute.2", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type1",{{"Attribute.1", "LocationName"}}),
#"Pivoted Column" = Table.Pivot(#"Renamed Columns", List.Distinct(#"Renamed Columns"[Attribute.2]), "Attribute.2", "Value", List.Sum)
in
#"Pivoted Column"

Simply, first unpivot and then pivot to bring the table like below structure.

samratpbi_0-1710542269259.png

Once Done, select map visual and add Latitude and Longitude and in tooltip, add Location Name and add a slicer on Place column.

samratpbi_2-1710542371433.png

 

If this resolves your problem then please accept this as solution. 
Also you may follow my blog page (https://littlebidata.wordpress.com/) where I share some technical knowledge and different case studies on Power BI. Thanks

 



HI @samratpbi , thanks! Sorry for the delay in answer, today I will test your solution, sounds as a good approach. I will let u know and mark as solved if it works, thanks again!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.