Courses / Power Query (Get & Transform)
36. Conditional Column (if ... then ... else)
Creating columns based on conditional logic using the Conditional Column UI or M if expressions.
Power Query M
Conditional Column (if ... then ... else)
A Conditional Column creates a new column whose value is chosen by an if ... then ... else expression based on each row's data.
"I want rows with missing or out-of-range values to show a clear label, without editing each cell by hand."
A Conditional Column uses an M expression of the form if <condition> then <value1> else <value2> to compute a value per row; you can nest conditions or use the UI to generate equivalent M.
"I want rows with missing or out-of-range values to show a clear label, without editing each cell by hand."
A Conditional Column uses an M expression of the form if <condition> then <value1> else <value2> to compute a value per row; you can nest conditions or use the UI to generate equivalent M.