Skip to main content

Hello community,

at the moment Im working on defining a drop down bottom to filter Production Order having Bad Conditions or without Bad Conditions.

To do so, I use a code like the one below.

Unfortunately, the amount of possible Bad Conditions is so high that after a certain number of

MATCH_PROCESS I get the error:

image.png891111 7.46 KB

But if I separate the formula in 2 pieces, then I get the desired result.

However, Im not able to combine the 2 pieces together and I should have multiple drop down lists as a filter not practical.

https://aws1.discourse-cdn.com/business6/uploads/celonis4/original/1X/4fb283e4f11e8af0da6f5d85db86d53e80ed6c2f.pngDo you have better ideas?

At least do we know if there is a real limited number of conditions that can be added in the CASE WHEN function?

Many thanks,

Francesca

CASE WHEN

** MATCH_PROCESS** (

LOOP[a] AS loop_A,

LOOP[b] AS loop_B,

LOOP[c] AS loop_C

CONNECTED BY DIRECT [loop_A, loop_B], DIRECT [loop_B, loop_C])>0

OR **

** MATCH_PROCESS (

LOOP[a] AS loop_A,

LOOP[b] AS loop_B,

LOOP[d] AS loop_D

CONNECTED BY DIRECT [loop_A, loop_B], DIRECT [loop_B, loop_D])>0

OR **

** MATCH_PROCESS (

LOOP[h] AS loop_H,

LOOP[g] AS loop_G,

LOOP[c] AS loop_C

CONNECTED BY DIRECT [loop_H, loop_G], DIRECT [loop_G, loop_C])>0

**OR **

OR

MATCH_PROCESS (

LOOP[a] AS loop_A,

LOOP[g] AS loop_G,

LOOP[d] AS loop_D

CONNECTED BY DIRECT [loop_A, loop_G], DIRECT [loop_G, loop_D])>0

THEN PO withBad Conditions

ELSE PO wo Bad Conditions

END

Hi Francesca,

Thanks for your feedback. We are looking into the error message you sent. How many ORs do you use? Which Celonis version do you use?

Since CPM4.5 and IBC you can use MATCH_PROCESS_REGEX that might simplify your life depending on the use case. It also allows to assign labels 1 or 0 to cases if they match the pattern.

Below I first assign aliases to direct connections of one or more occurrences of A, .

I then say that the process matches if the connection AB is eventually followed by BC, and so on.

CASE WHEN
MATCH_PROCESS_REGEX( "activities"."activity",
(('A')+ >> ('B')+) as AB,
(('B')+ >> ('C')+) as BC,
(('B')+ >> ('D')+) as BD,
(('H')+ >> ('G')+) as HG,
(('G')+ >> ('C')+) as GC,
(('A')+ >> ('G')+) as AG,
(('G')+ >> ('D')+) as GD,
(AB >> (ANY)* >> BC) |
(BC >> (ANY)* >> AB) |
(AB >> (ANY)* >> BD) |
(BD >> (ANY)* >> AB) |
(HG >> (ANY)* >> GC) |
(GC >> (ANY)* >> HG) |
(AG >> (ANY)* >> GD) |
(GD >> (ANY)* >> AG)) = 1
THEN 'PO with bad conditions'
ELSE 'PO without bad conditions'
END

Does this work for you? Kind regards,

Max


Hello Max,

thanks for your reply and apologies for the late answer, due to holidays.

Celonis 4.5. The amount of OR is about 150.

However, I tested the Match_Process_regex, and indeed it provides a more efficient way to select a CASE based on a complex possibility of activities sequences (all possible bad scenario, so to speak).

Thanks again. Problem solved!

Ciao,

Francesca


Reply