Hi All,
For this question my main purpose is to replace a column containing text such as Yes/No with a logical column. Rather than use a replace text method, I'm trying to achieve by adding a Custom calculated column, via a function. I'm struggling to figure out how to dynamically refer to a column for the formula/expression in the following step:
to something like....
Hopefully the attached is clear enough?
I'm very new to M language so I'd be interested to hear what would be considered the best approach to achieve the same, but if different I'd still like to understand how to dynamically add column names when creating the formula/expression as can see I may need this in the future.
Thanks in advance
For this question my main purpose is to replace a column containing text such as Yes/No with a logical column. Rather than use a replace text method, I'm trying to achieve by adding a Custom calculated column, via a function. I'm struggling to figure out how to dynamically refer to a column for the formula/expression in the following step:
Code:
AddedTempCol = Table.AddColumn(Source, "TempCol", each [Complete] = TrueValue, type logical),
to something like....
Code:
AddedTempCol = Table.AddColumn(Source, "TempCol", each "[" & ColumnName & "]" = TrueValue, type logical),
Hopefully the attached is clear enough?
I'm very new to M language so I'd be interested to hear what would be considered the best approach to achieve the same, but if different I'd still like to understand how to dynamically add column names when creating the formula/expression as can see I may need this in the future.
Thanks in advance