Parsing a .json column in Power BI

Use Json.Document function like this

let
    ...
    your_table=imported_the_data_directly_from_the_server,
    json=Table.AddColumn(your_table, "NewColName", each Json.Document([JsonResult]))
in
    json

And then expand record to table using Table.ExpandRecordColumn

Or by clicking this button

enter image description here


Use Json.Document() function to convert string to Json data.

let
    Source = Json.Document(Json.Document(Web.Contents("http://localhost:18091/pools/default/buckets/Aggregation/docs/AvgSumAssuredByProduct"))[json]),
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each not Text.Contains([Name], "type_")),
    #"Renamed Columns" = Table.RenameColumns(#"Filtered Rows",{{"Name", "AvgSumAssuredByProduct"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Value", type number}})
in
    #"Changed Type"

There is an easier way to do it, in the Query Editor on the column you want to read as a json:

  • Right click on the column
  • Select Transform>JSON

then the column becomes a Record that you can split in every property of the json using the button on the top right corner.

split columns