MAGIC ETL Formula

Hi Guys,

I am working on a workflow, I have two datasets I combined using left join. Now I have a new column "Category". Now those that are null in the category column and have have "AB" text on its Product Group name should be identified as "Above Normal" and those that doesn't have should be "Normal". But when I run it, it all define it as "Normal"

My Formula is below:

CASE WHEN (`Category`is null) AND `Product Group name`='%AB%' THEN 'Above Normal' ELSE 'Normal' END

Tagged:

Answers

  • @aldwinB Instead of  `Product Group name`='%AB%', use  `Product Group name` LIKE '%AB%'. The LIKE operator allows you to search for patterns in a string using wildcards, while the equals sign matches the exact string in quotes (in this case %AB%)

  • aldwinB
    aldwinB Member
    edited December 2022

    Thank you @MichelleH

    It worked, although there are some still not captured as Above normal.