Forum Discussion
Naming expanded rows in Multidimensional JSON
Hi RuneStrand ,
I don't quite understand your description. Would you please show us screenshot and M-query for it?
Best Regards,
Dedmon Dai
- RuneStrand6 years agoFrequent Visitor
My PowerBi is running in Danish language - so I've tried to translate the danish names manually - so if there are small type-o's that's why)
The code from the advanced editor is:
#"Custom1" = Table.AddColumn(#"Expanded Column1", "QC points header", each Record.FieldNames([qc_points])),
#"QC points header" = List.Combine(#"Custom1"[QC points header]),#"QC Headers" = List.Distinct(#"QC points header"),Custom2 = #"Expanded Column1",#"Expanded qc_points" = Table.ExpandRecordColumn(Custom2, "qc_points", #"QC Headers")
The issue is that the list I'm creating "QC Headers", contains just numbers (1,2,3,etc..) - and we need it this was in the database. But for my PowerBi Model I want QC1,QC2,QC3,etc... or qc_points1, qc_points2, qc_points3,etc.. basically just a way to add text to each field in the list, so that when I use this list as headers in "Table.ExpandRecordColumn(Custom2, "qc_points", #"QC Headers")", I will know where they came from.
I have multiple records that I need to do this operation on, and just having 1,2,3 as headers on all of them, once expanded, doesn't work then.
I hope it makes more sense now.