Forum Discussion
S_Harmon
2 years agoNew Member
Return value in column if it contains a specific value, if not return value in a different column
Hi, Im trying to create the "New Department" column where it looks for "Machine Shop" or "Charge Shop" in the Supplier column and returns those values if it contains one of those values. If it do...
rsbin
Community Champion
2 years agoS_Harmon ,
Please try this as a Calculated Column in DAX:
NewDepartment = SWITCH(
TRUE(),
[Supplier] IN { "Machine Shop", "Charge Shop" }, [Supplier],
[Department] )
Else you could do an if function in Power Query as well.
Regards,
S_Harmon
2 years agoNew Member
That worked! Thank you so much! I was way over thinking that for some reason.