I am new in process mining , i need help in one of pql

i have list of activities in my workflow and i want to write the pql for
“finding list of activities where avg throughput time is more than 1 day”.

let say the activity A and B has avg throughput time is 1 day and for Activity B and C is more than 1 day.

so it should show activity B and C as per pql with their case id

Hi and welcome :slight_smile: Thank you for taking the time to write your question.
I think what you need to do something like this

FILTER diff(activity.eventtime, activity_lag(activity.eventtime,1), days) > 1

Please use our “PQL Reference” for more help. As it is shown in the screenshot below.

Hi @e.ndrio
it says there is no diff operation or keyword available in pql.

i am still not able to resolve the issue.

please provide solution.

Did you try date diff?

image

hi @e.ndrio

i tried the same.

PFA issue on attached screenshot.

let me know if i am doing something wrong

.

Can you guide???

Hi, after checking the documentation “Filters” can be defined only as Analysis or Component Filter.

So I assume what you need to do is to add component filter. Right-click to your component and choose component filter

will try later to do it on my own and give you the exact solution.

hi @e.ndrio;

if you are able to do it, please share the solution.

Hi,

the following component filter will keep all activities that have a throughput time of more than 1 day:

FILTER DAYS_BETWEEN(“Activtities”.“EVENTTIME”, ACTIVITY_LEAD(“Activtities”.“EVENTTIME”)) > 1;

As dimensions in your OLAP table, just add the case ID and the Activity name.

This does not take any average into account. You said that you want to filter on those activities with an average throughput time larger than 1 day, but you also want to show the case IDs. So do you want to calculate the average inside a case, or overall? Or is the filter I gave you above the solution that you had in mind?

Best,
David