Skip to main content
Question

How do I code a PQL that calculates the number of processes that go through a particular activity A?

  • March 11, 2023
  • 4 replies
  • 3 views

Forum|alt.badge.img+14

I would like to add a column to the OLAP table that lists the number of processes that go through a particular activity and the number of processes that do not go through a particular activity. How do I code a PQL that calculates the number of processes that go through a particular activity A?

4 replies

abhishek.chatu14
Level 11
Forum|alt.badge.img+4

PQL that calculates the number of time an activity is executed that go through a particular activity A is as follows

 

SUM(CASE WHEN ACTIVITY_TABLE.ACTIVITY = 'ACTIVITY A' THEN 1 ELSE 0 END )

 

I am not sure what you mean by number of processes 

 

 


Forum|alt.badge.img+14
  • Author
  • Level 6
  • March 12, 2023

PQL that calculates the number of time an activity is executed that go through a particular activity A is as follows

 

SUM(CASE WHEN ACTIVITY_TABLE.ACTIVITY = 'ACTIVITY A' THEN 1 ELSE 0 END )

 

I am not sure what you mean by number of processes 

 

 

@Abhishek Chaturvedi  Thank you for your reply.

 

>I am not sure what you mean by number of processes

It meant the number of cases going through a particular activity.

 

In contrast, if I want to calculate the number of cases that do not go through a particular activity, what would be the PQL formula?


Use

PROCESS EQUALS <activity>

PROCESS NOT EQUALS <activity>

in filters or inside a SUM(CASE WHEN ...) structure.

 

HTH


Forum|alt.badge.img+14
  • Author
  • Level 6
  • March 15, 2023

Use

PROCESS EQUALS <activity>

PROCESS NOT EQUALS <activity>

in filters or inside a SUM(CASE WHEN ...) structure.

 

HTH

Thank you for your reply. I'll try.