Multiple cases in CASE WHEN

Hello!

I am trying to include a formula with three possible outputs based on three different conditions inside an ETL but I don't know what's wrong with my formula:

Help is appreciated!

Best Answer

  • ColemenWilson
    Answer ✓

    Should be:

    CASE WHEN `Type` IS NULL THEN 'Daily' WHEN `Type Sourced Daily` IS NULL THEN 'Monthly' ELSE 'Mutual' END

    You need to drop the extra "ELSE" and use single quotes ' ' instead of double quotes " "

    If I solved your problem, please select "yes" above

Answers

  • ColemenWilson
    Answer ✓

    Should be:

    CASE WHEN `Type` IS NULL THEN 'Daily' WHEN `Type Sourced Daily` IS NULL THEN 'Monthly' ELSE 'Mutual' END

    You need to drop the extra "ELSE" and use single quotes ' ' instead of double quotes " "

    If I solved your problem, please select "yes" above