Forum Discussion
Parsing JSON is not giving all values
Hi Anonymous ,
Are you looking for output similar to this? Try unpivoting the expanded columns.
Advanced editor:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WUqiOUQpJLM52SSxJDcnMTTUyiVGyilEyMjAy0TUw0jU0CzEwsAIjPQMDgxglHTTlxijKjSwJKDdCVW6EprxWSUfJUClWJ1oJ6iy/sMQi54zEIhNTsEa4gTBxIwsLqEStAlCvEQV6jSnQa6IUGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CustomFields = _t, Column1 = _t]),
#"Replaced Value" = Table.TransformColumnTypes(Source,{{"CustomFields", type text}, {"Column1", Int64.Type}}),
#"Parsed JSON" = Table.TransformColumns(#"Replaced Value",{{"CustomFields", Json.Document}}),
#"Expanded CustomFields" = Table.ExpandRecordColumn(#"Parsed JSON", "CustomFields", {"TaskDateTime24", "TaskDateTime23", "TaskDateTime22", "TaskNVarChar45", "TaskNVarChar288"}, {"TaskDateTime24", "TaskDateTime23", "TaskDateTime22", "TaskNVarChar45", "TaskNVarChar288"}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Expanded CustomFields", {"Column1"}, "Attribute", "Value")
in
#"Unpivoted Columns"
If I misunderstood your question, could you tell me what your expected output is?
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
I need each Attribute to be its own Field/Column. I have reached out to my data source for a possible SQL solution. I thought that the parsing was working...but it only brings in partials.