Forum Discussion
lenosepulveda
3 years agoFrequent Visitor
code M for conditional column with two conditions (IF; AND)
I need to create a conditional column where I get two conditions. Example: If the "Error code" column does not start with the text "EAC" and "REV", return the value 1, or return the value 0. ...
wdx223_Daniel
3 years agoCommunity Champion
#"Conditional Column Added2" = Table.AddColumn(#"Reordered Columns1", "conditionaldtc", each if not List.Contains({"EAC","REV"},[Cod. Erro],each Text.StartsWith(y,x)) then 1 else 0)
lenosepulveda
3 years agoFrequent Visitor
Hello, i appreciate your help. But what should I put in X's shoes?
In the function, Text.StartsWith(y,x) Should I put the column name for the value of y example: ([Cod. error]), but I would like to analyze all the rows of the column, so what parameter do I put to the value of X?