Multiple Case When statement

Options

Hi - I'm looking for a Case statement that will provide a new column when 2 columns meet a particular condition.

I've tried multiple versions but none have worked. 2 examples below. Thanks in advance for any suggested fixes to the formula.

IF(AND(`Plant`=1302,`Line of Business`='cable'),'QC Fibre','')


WHEN(`Plant`=1302 AND `Line of Business`='Cable')

THEN 'QC Fibre'

END

Best Answer

  • GrantSmith
    GrantSmith Coach
    edited November 2021 Answer ✓
    Options

    @Emma

    Try this:

    CASE WHEN `Plant`=1302 AND `Line of Business`='Cable' THEN 'QC Fibre' END
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • GrantSmith
    GrantSmith Coach
    edited November 2021 Answer ✓
    Options

    @Emma

    Try this:

    CASE WHEN `Plant`=1302 AND `Line of Business`='Cable' THEN 'QC Fibre' END
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Emma
    Options

    Thank you Thank you @GrantSmith It worked beautifully.