Forum Discussion

BozPLR's avatar
BozPLR
Frequent Visitor
1 year ago
Solved

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 t...
  • lbendlin's avatar
    1 year ago

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

     

    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"