Skip to main content
Question

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

  • January 23, 2020
  • 7 replies
  • 0 views

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

7 replies

Erin Ndrio
Celonaut
Forum|alt.badge.img
  • Celonaut
  • January 24, 2020
Hi and welcome 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. image777271 10.8 KB

  • Author
  • Level 1
  • January 27, 2020
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.

Erin Ndrio
Celonaut
Forum|alt.badge.img
  • Celonaut
  • January 27, 2020
Did you try date diff?

  • Author
  • Level 1
  • January 27, 2020
hi @e.ndrio i tried the same. PFA issue on attached screenshot. let me know if i am doing something wrong Capture1234657 54.1 KB . Can you guide???

Erin Ndrio
Celonaut
Forum|alt.badge.img
  • Celonaut
  • January 28, 2020
Hi, after checking the documentation Filters can be defined only as Analysis or Component Filter. image1630882 68 KB So I assume what you need to do is to add component filter. Right-click to your component and choose component filter image344523 37.2 KB will try later to do it on my own and give you the exact solution.

  • Author
  • Level 1
  • January 29, 2020
hi @e.ndrio; if you are able to do it, please share the solution.

Forum|alt.badge.img+2
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