Forum Discussion
davi
3 years agoFrequent Visitor
Replace null values from multiple columns with values from other columns in place
I have a table with a level structure with some null values on upper levels and I wanted to replace those empty records with the value from the first previous level that is not null. Conceptually I t...
AlienSx
Super User
3 years agoHi, davi
use Table.TransformRows instead. It will give you list of records in the end but you can wrap the whole step with Table.FromRows to get your table back.
- davi3 years agoFrequent Visitor
Thanks AlienSx ! I had to create one step per level like bellow and it worked:
Table.FromRecords(Table.TransformRows(#PreviousStep,
(r) => Record.TransformFields(r,
{{"A1", each if _ = null then r[#"A"] else _},
{"B1", each if _ = null then r[#"B"] else _}})))- AlienSx3 years ago
Super User
Neat!