cancel
Showing results for 
Search instead for 
Did you mean: 

Calculated Column Script

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

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

Answers (0)