Forum Discussion

UnearthlyFalcon's avatar
UnearthlyFalcon
Advocate I
6 months ago
Solved

New Conditional Column from Two Other Columns in M

Hi all,   I have a table like below.    ID Pet Type Number Category Unique 1 Cat 1 Unique 2 Dog 2 Unique 3 Cat 3 Unique 4 Dog 3 Unique 5 Cat 2 Unique 6 Dog 1 ...
  • jgeddes's avatar
    6 months ago

    This should solve your issue. 

    = Table.AddColumn(previousStep, "ConditionalColumn", each if [Number Category] = 3 and [Pet Type] = "Dog" then "Adopted" else [Pet Type], type text)