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
Anonymous
Not applicable

Multiple Lon Lat columns; arcgis visual

Hi all,

 

So i have a dataset that which looks like this:

 

ObjectX.LonObjectX.LatObjectY.LonObjectX.Lat

 

Does anyone know if it is possible to add data from object X aswell as object Y in one visual ? (perhaps X as squares and Y as triangles). In my real dataset there are (far) more than 2 objects so I would like to know if this is possible.

 

Best regards,

L.Meijdam

4 REPLIES 4
Anonymous
Not applicable

While I am unsure about the visual part of your question. The way I would go about this is by unpivoting your data so that you have one column with all the Lat and one with all the Long with an seperate two columns that diplay the object the information is related to. Then I would use this object column as a legend in the visual.

 

You will need to filter to only show rows where the object column is the same for lat and long. I have included some M code that does what I describe above. It probably isnt the cleanest way to do it but it does work. I have also shown a screenshot of a stock map visual with the category as the different colours.

 

I hope this helps

 

map.png

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzmDSBUy6KsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Name = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1),
    #"Added XLong" = Table.AddColumn(#"Added Index", "XLong", each Number.RandomBetween(-160 + [Index] - [Index],160),Number.Type),
    #"Added XLat" = Table.AddColumn(#"Added XLong", "XLat", each Number.RandomBetween(-70 + [Index] - [Index],70),Number.Type),
    #"Added YLong" = Table.AddColumn(#"Added XLat", "YLong", each Number.RandomBetween(-160 + [Index] - [Index],160),Number.Type),
    #"Added YLat" = Table.AddColumn(#"Added YLong", "YLat", each Number.RandomBetween(-70 + [Index] - [Index],70),Number.Type),
    #"Added ZLong" = Table.AddColumn(#"Added YLat", "ZLong", each Number.RandomBetween(-160 + [Index] - [Index],160),Number.Type),
    #"Added ZLat" = Table.AddColumn(#"Added ZLong", "ZLat", each Number.RandomBetween(-70 + [Index] - [Index],70),Number.Type),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Added ZLat", {"Name", "Index", "XLong", "YLong", "ZLong"}, "Attribute", "Value"),
    #"Unpivoted Columns1" = Table.UnpivotOtherColumns(#"Unpivoted Columns", {"Name", "Index", "Attribute", "Value"}, "Attribute.1", "Value.1"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Columns1",{{"Attribute", "Lat"}, {"Value", "LatValue"}, {"Attribute.1", "Long"}, {"Value.1", "LongValue"}}),
    #"Replaced Value" = Table.ReplaceValue(#"Renamed Columns","Long","",Replacer.ReplaceText,{"Long"}),
    #"Replaced Value1" = Table.ReplaceValue(#"Replaced Value","Lat","",Replacer.ReplaceText,{"Lat"}),
    #"Added Custom" = Table.AddColumn(#"Replaced Value1", "LatCustom", each if [Lat] = [Long] then 1 else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "LongCustom", each if [Lat]=[Long] then 1 else null),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"LongCustom", type number}, {"LatCustom", type number}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type1", each ([LatCustom] <> null and [LongCustom] <> null)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"LatCustom", "LongCustom", "Long"}),
    #"Renamed Columns1" = Table.RenameColumns(#"Removed Columns",{{"Lat", "Category"}})
in
    #"Renamed Columns1"

 

Anonymous
Not applicable

Hi @Anonymous,

 

Thanks for your fast reply!

 

I have also considered this approach but in my case it is very important to be able to see the differences between (for example) Object X and Y and that would be lost in this approach. For now I am leaving this topic open in the hope someone know a workaround 🙂

 

Best regards,

L.Meijdam

Anonymous
Not applicable

You can attach an identifying column before you unpivot and then use that to filter for measures if you wanted to compare. For example in my example I can filter by name and it will only show items that have the name "A" for example. if you have other fields, for example sales at each location it will be a bit harder but should be possible to get the difference between two objects within the same row.

Anonymous
Not applicable

Hi @Anonymous,

 

I understand that you would be able to use filters etc on them, but the objects in the map simply indicate static objects that are on that location. What I would like to achieve is to display the different objects on the map with each it's own shape or icon. I don't want to compare object X and Y with eachother I just to see their location in comparision to each other

 

best regards,

L.Meijdam

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.