Skip to main content

I wanted to use the following filter statement which unfortunately doesn't work:

FILTER "Table"."type" = (<%=type1%>) AND "Table"."type" = (<%=type2%>);

 

Strangely enough, the filter does work if I replace the 'AND' with 'OR' like the following:

FILTER "Table"."type" = (<%=type1%>) OR "Table"."type" = (<%=type2%>);.

However, this would have the same result as an 'IN' statement like the following:

FILTER "Table"."type" IN (<%=type1%>, <%=type2%>);

 

But I need an 'AND' or an 'IN' where all selected 'types' are true and not only one from the 'IN' list.

 

Can someone please help me with that issue?

Hi Niclas,

 

try this code:

 

FILTER "Table"."type" = (<%=type1%>);

FILTER "Table"."type" = (<%=type2%>);

 

I hope it will solves your problem


Hi Niclas,

 

try this code:

 

FILTER "Table"."type" = (<%=type1%>);

FILTER "Table"."type" = (<%=type2%>);

 

I hope it will solves your problem

Hi Rashid,

thanks for you feedback.

Unfortunately, your solution also doesn't work. Individually both filter statements work, but both combined unfortunately not.


Hi Rashid,

thanks for you feedback.

Unfortunately, your solution also doesn't work. Individually both filter statements work, but both combined unfortunately not.

Hi Niclas,

That's strange.

Maybe try a dropdown with multiselection of the column "Table"."type" ? This will work like a Filter selection


Hi Rashid,

thanks for you feedback.

Unfortunately, your solution also doesn't work. Individually both filter statements work, but both combined unfortunately not.

Hi Niclas,

 

I found this function too:

Filter BIND_FILTERS( "Table", "Table"."type" = <%=type1%>, "Table"."type" = <%=type2%>);

 


Hi Rashid,

thanks for you feedback.

Unfortunately, your solution also doesn't work. Individually both filter statements work, but both combined unfortunately not.

Hi Rashid,

multiselection of the column again works like an "IN"-Statement, so not both types have to be in the case, but only at least one.

 

The BIND_FILTERS i tried as well...unfortunately, with the same outcome. It works with only one limitation (e.g. "Table"."type" = <%=type1%>), but not with both.


Hi Rashid,

 

the AND condition is muttually exclusive and therefore, cannot happen simultaneously. The OR condition in opposite is the unio of both sets.

In Other word, when you write "Table"."type" = <%=type1%> and "Table"."type" = <%=type2%>, you are selecting values that are at the same time <%=type1%> and <%=type2%>, and this is inpossible.

 

I would suggest you use IN_LIKE ( <%=type1%>, <%=type2%>) or just IN ( <%=type1%>, <%=type2%>)

 

Good luck,

Dany


Hi Dany,

as explained neither "IN" nor "IN_LIKE" will result in the outcome that I need. What I would need is something like "In_both" which is obviously not available.

 

Is there no work-around for such an use-case in PQL/Celonis? I even tried to use the types as "ACTIVITY_DETAILS" and then work with the activity table.

However, if I then try to filter for cases which have the activity twice and try to count the distinct "ACTIVITY_DETAILS", after filtering for two types, I get skewed results with cases that actually got the activity twice, but only one of the two filtered "ACTIVITY_DETAILS".


I think what you're trying to do won't work. The logic wouldn't allow it.

 

Let's say you have a list of values like this: 0, 1, 2, 3, 4, 5]

 

And you ask Celonis to pull out values that equal both 1 and 2. The way the logic will process as written will look to see if a value is both a 1 and a 2 at the same time, which it can't logically be both a 1 and a 2.

 

If you said look at one column and pull a specific value and then look at a different column and pull a different one, that would work.

 

Can you explain your use case a little more to see if a solution could be found?


I think what you're trying to do won't work. The logic wouldn't allow it.

 

Let's say you have a list of values like this: 0, 1, 2, 3, 4, 5]

 

And you ask Celonis to pull out values that equal both 1 and 2. The way the logic will process as written will look to see if a value is both a 1 and a 2 at the same time, which it can't logically be both a 1 and a 2.

 

If you said look at one column and pull a specific value and then look at a different column and pull a different one, that would work.

 

Can you explain your use case a little more to see if a solution could be found?

Yes, an AND doesn’t make sense for one column. One column of one row can only has one value.


Reply