The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a column, "JSON" where each field is a record, and another column "ref1" which holds a reference to the JSON record. In this example it's just the text "accel" (one of the elements in the json record), but in practice each row would be different.
I am trying to create a new column which pulls out the "accel" value from the json array. This is what Ive tried:
But the problem is, it is looking for the value "A", not the value the variable holds, which is [ref1] or "accel".
Is there a way to use the square brackets selector to pick an element in the record, but use some sort of syntax to insert the actual value of my variable in? Something like:
A = [ref1]
element = [JSON][[A]] or
element = [JSON][#"A"]
where it references the value of the variable A, not the string "A".
Thank you!
Solved! Go to Solution.
I figured out a solution. Instead of referencing using:
element = [JSON][A]
I used:
Record.Field([JSON],[A])
This worked!
I figured out a solution. Instead of referencing using:
element = [JSON][A]
I used:
Record.Field([JSON],[A])
This worked!