Forum Discussion

TomTomTom's avatar
TomTomTom
Helper II
6 years ago
Solved

How to PQ this geoJSON file on a map?

I'd like to be able to use this geojson file into maps on PowerBI, where I would then overlay other info, but I can't seem to get the query right:

 

geojson file in question

 

Can anyone help?

3 Replies

  • artemus's avatar
    artemus
    Microsoft Employee

    The query will look like:

    let
        Source = Json.Document(File.Contents("<Your file location>")),
        features = Source[features],
        Custom1 = Table.FromRecords(features),
        #"Expanded properties" = Table.ExpandRecordColumn(Custom1, "properties", {"FID", "CCG19CD", "CCG19NM", "BNG_E", "BNG_N", "LONG", "LAT", "Shape__Area", "Shape__Length"}, {"FID", "CCG19CD", "CCG19NM", "BNG_E", "BNG_N", "LONG", "LAT", "Shape__Area", "Shape__Length"}),
        #"Removed Columns" = Table.RemoveColumns(#"Expanded properties",{"geometry"})
    in
        #"Removed Columns"