Forum Discussion
Alicia83B
4 years agoHelper I
Replace Values in Power Query Based on Conditions
I have an Opportunities Table with a column for Territory and Seller. I currently am replacing Mary’s territory from 1 to 16 using the below formula. = Table.AddColumn(#"Changed Type1", "Chng Territ...
- 4 years ago
Replace if condition with either of these (2nd one is useful if you have many names)
if ([Assigned To] = "Mary" or [Assigned To] = "Tim" or [Assigned To] = "Robin") and [Territory] >=1 then "16" else [Territory]
if List.Contains({"Mary","Tim","Robin"},[Assigned To]) and [Territory] >=1 then "16" else [Territory]
Vijay_A_Verma
4 years agoMost Valuable Professional
Replace if condition with either of these (2nd one is useful if you have many names)
if ([Assigned To] = "Mary" or [Assigned To] = "Tim" or [Assigned To] = "Robin") and [Territory] >=1 then "16" else [Territory]
if List.Contains({"Mary","Tim","Robin"},[Assigned To]) and [Territory] >=1 then "16" else [Territory]