Skip to Content
-2

Calculated Column Script

Hi Experts,

Can you please advise on how I would implement below logic in a Calculated Column in a CV?

SQL or Column doesn't matter.

CASE WHEN Customer = 2 AND (CATEGORY NOT IN ('500', '250') OR GROUP IN ('a','b')) THEN AMOUNT ELSE 0

Thanks,

DJ

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 13, 2017 at 03:37 PM

    Hello David,

    by checking the HANA Miscellaneous Functions for modeling you should be able to solve the requirement by yourself.

    A simple solution would be to use the "if" function in a calculation engine calculated column (consider that you use the right upper/lower case names of your columns).

    if("Customer" = 2 and (("CATEGORY" <> '500' and "CATEGORY" <> '250') or "GROUP" = 'a' or "GROUP" = 'b')),"AMOUNT",0)

    Regards,
    Florian

    Add comment
    10|10000 characters needed characters exceeded