Forum Discussion
Sandie_Fong
1 year agoNew Member
IF Contain function value
I need to create a new column called "Job Group" based on the "EE List.Job" list. If the cell contain HSS, RN, Clinician from the EE List.Job, then the new column of the corresponding row shows ...
- 1 year ago
Hi Sandie_Fong Try below code in power query advance option:
= Table.AddColumn(#"PreviousStepName", "Job Group", each if Text.Contains([EE List.Job], "HSS") then "HSS" else if Text.Contains([EE List.Job], "RN") then "RN" else if Text.Contains([EE List.Job], "Clinician") then "Clinician" else null)Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
shafiz_p
Super User
1 year agoHi Sandie_Fong Try below code in power query advance option:
= Table.AddColumn(#"PreviousStepName", "Job Group", each if Text.Contains([EE List.Job], "HSS") then "HSS" else if Text.Contains([EE List.Job], "RN") then "RN" else if Text.Contains([EE List.Job], "Clinician") then "Clinician" else null)
Hope this helps!!
If this solved your problem, please accept it as a solution and a kudos!!
Best Regards,
Shahariar Hafiz
- Sandie_Fong1 year agoNew Member
Thank you! I was trying to write this myself but have error with expression. Yours worked.