Skip to main content

Hi,

 

I am trying to filter the data using CASE WHEN statement in the component filter section but it is not working.

Scenario: when DATE_1 is not NULL then show data only till yesterday using DATE_1 (DATE_1 < TODAY()) else show data till yesterday using DATE_2 (DATE_2 < TODAY()).

 

This works file if I execute single statement like FILTER DATE_1 < TODAY() but it is not working when I combine into CASE WHEN like below:

 

FILTER CASE WHEN

ISNULL(DATE_1)=0 THEN DATE_1 < TODAY()

ELSE

DATE_2 < TODAY();

 

Any help is really appreciated.

 

Note: We are using Celonis on-prem 4.5

I would rewrite your CASE WHEN to an OR - AND construct:

FILTER

(ISNULL(DATE_1)=0 AND DATE_1 < TODAY())

OR

(ISNULL(DATE_1)=1 AND DATE_2 < TODAY())

;

 

Please let me know if this worked!


I would rewrite your CASE WHEN to an OR - AND construct:

FILTER

(ISNULL(DATE_1)=0 AND DATE_1 < TODAY())

OR

(ISNULL(DATE_1)=1 AND DATE_2 < TODAY())

;

 

Please let me know if this worked!

Hi Joos,

 

It worked!! Many thanks :)


Reply