Skip to main content

I have 2 columns in which I am looking to find the difference for. Since some values of each column contain a null they are not reflected accurately

 

for example

Column 1 Column2 Diff

2 1 1

4 NULL NULL (should be 4)

NULL 5 NULL (should be -5)

 

I have the formulas associated with getting values in Column 1 and Column 2 within saved formulas as "KPI(.......)".

 

My initial idea was to substitute NULL as 0, but when I surround KPI(...) with a CASE WHEN it fails saying that CASE is not supported with INT or STRING

 

Any ideas?

https://community.celonis.com/t/using-pu-functions-within-case-when-statements/3170

This might be a good place to start


Using the above resource I was able to use the COALESCE function to change the NULL values to 0


Reply