Hi,
I have a connection to a data source that is regularly updating with user entered data. One of the columns it brings in contains data in the following format:
{"Label1":"Value1","Label2":"Value2","Label3":"Value3"}
I need to transform this to the following:
Row | Label1 | Label2 | Label3 |
1 | Value1 | Value2 | Value3 |
The issue with this column is that while the format structure is the same the labels and values are variable.
So the next row could contain the following:
{"Label3":"Value3","Label1":"Value1","Label4":"Value4"}
So the data set should now look like:
Row | Label1 | Label2 | Label3 | Label4 |
1 | Value1 | Value2 | Value3 | |
2 | Value1 | Value3 | Value4 |
Using Power BI's JSON parser was working fantastically to perform this task except until it encoutered duplicate values (user entered error but there's no validation control on the source) within the field:
{"Label3":"Value3","Label3":"Value3","Label4":"Value4"}
or if that field was blank it then returns errors.
Any ideas on a better way to do the transform?
Cheers,
Andrew.