Nivas Kannan
Nivas Kannan

Reputation: 1

Expand a table based on JSON string present in a SQL table

We've got a usecase to display a grid in power bi dashbord which contains a JSON obejct in one of its column. The JSON data will based on another column value. 

Based on the category selection, the JSON content should be expanded to table(always one row, multiple columns).

Table Snapshot

Please find the table below.

Upvotes: 0

Views: 89

Answers (1)

Aldert
Aldert

Reputation: 4323

Select the JsonData Column, select the Transform TAB and click Parse/Json. enter image description here

Result is your text becomes records. Now on the right of your JsonData Column you have the dubble arrow, click on it. You do not need the prefix of original name so unselect checkbox. Click OK.

enter image description here

Now you went on level deeper (your column changed to DynamicProperties). Click the dubble arrow again.

End result is the table with all propoerties as in your Json.

enter image description here

Upvotes: 1

Related Questions