Forum Discussion
TP-101
Helper I
2 years agoExpanding a data column with mixed Text and Records
I'm attempting to expand a Record column however, there is text "Any" on some rows. Observing: Expression.Error: We cannot convert the value "Any" to type Record. (screenshots) Question, is th...
- 2 years ago
to know how to do this watch my video
https://1drv.ms/v/s!AiUZ0Ws7G26RjGrE5atu46KqC_bh?e=3oz8WT
= Table.ReplaceValue( Custom1 , each [victim], each if [victim] is text then [ [victim]] else [victim], Replacer.ReplaceValue,{"victim"})
amitchandak
Super User
2 years agoTP-101 , You have to take approach suggested in this power query solution
https://www.myonlinetraininghub.com/extracting-data-from-lists-and-records-in-power-query
TP-101
Helper I
2 years agoThank you for the tip amitchandak . I gave that a try and couldnt get it to work the way I want. Let me rephrase the original ask. The column I want to expand "victim", if it says "Any", I do want to keep that value and also expand the Record. The data source is JSON so I'm trying to unpack the nested layers. I'm working with the Advanced Editor, any code examples would be helpful