Skip to main content
Question

Hi,I would like to count the cases which have a certain activity. (not the same as activity count) If they have the activity 40 times per case I want only to count them as 1 per case. Does anyone have a suggestion? Thank you in advance

  • November 4, 2022
  • 2 replies
  • 13 views

The standard ratio count does not work because it takes into account the activities and not the cases.

I have tried: filter count (which does not work because it counts activity and not the cases)

I tried multiple PU_count and PU_count_distinct (also did not work)

I have tried case when (activity = "XX") then count (cases) else 0. (But this is not allowed in Celonis)

2 replies

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

The syntax you are looking for is as follows

 

SUM(Case when activity = "XX" then 1 else 0 end )

 

This would give you of a summation of all the rows where the activity is present.

 

Now since you want to take the count of distinct case here is what that would look like

 

COUNT ( DISTINCT Case when activity = "XX" then case_table.casekey end )

 

In this case you are looking at unique case keys that give you the desired output.


Forum|alt.badge.img+11

Hi Gabriella,

 

You should also be able to use PROCESS EQUALS, so:

SUM(CASE WHEN PROCESS # 'Your Activity' THEN 1 ELSE 0 END)

 

Hope this helps,

Marcel