Skip to main content
Aug 5, 2022 4:00 PM UTC
Question

How to calculate median for this ask. Requirement: Casetable count for a specific activity per document type?

How to calculate median for this ask. Requirement: Casetable count for a specific activity per document type?

6 replies

Aug 8, 2022 12:38 PM UTC

Hello, not sure to understand your request but do you want like an OLAP Table with :

  • Document Type as DIMENSION
  • Count table as KPI
  • Specific activity as Filter or dropdown button ?

Here, I don't see where Median is required

Aug 9, 2022 10:41 AM UTC

Hello, not sure to understand your request but do you want like an OLAP Table with :

  • Document Type as DIMENSION
  • Count table as KPI
  • Specific activity as Filter or dropdown button ?

Here, I don't see where Median is required

Thanks for your response.

I need this in a Number component.

It has to be like Median(count(casetable, activity table, activity = 'name') /

count(distinct (table.column)))

For this I'm getting aggregation error.

​

Aug 9, 2022 2:44 PM UTC

Thanks for your response.

I need this in a Number component.

It has to be like Median(count(casetable, activity table, activity = 'name') /

count(distinct (table.column)))

For this I'm getting aggregation error.

​

Hello,

Does it works when you do only : Median(count(casetable, activity table, activity = 'name') ?

 

According to me, we can't accumulate aggregation expression, Celonis says ("Aggregate expressions cannot be nested inside aggregate expressions") so the solution could be PU fonction

 

Best regards

 

Aug 9, 2022 4:44 PM UTC

Thanks for your response.

I need this in a Number component.

It has to be like Median(count(casetable, activity table, activity = 'name') /

count(distinct (table.column)))

For this I'm getting aggregation error.

​

Hi @francois.court​ 

Yes, I tried with PU function too.

Can you help me with example code to achieve the median with a pu function.

I need to consider 3 different tables inorder to achieve the correct result. ​

Aug 10, 2022 1:37 PM UTC

Thanks for your response.

I need this in a Number component.

It has to be like Median(count(casetable, activity table, activity = 'name') /

count(distinct (table.column)))

For this I'm getting aggregation error.

​

Hello,

I would like to but I am afraid I can't, sorry :

"Median(count(casetable, activity table, activity = 'name')"

would be : Median (PU_COUNT(casetable, activity_table, activity = 'name')

But, in PU function we need two tables so the division part can't work as it stands

imageSo I think the easiest way is an OLAP Table as in my first message

Hope you will find out

Best regards

Aug 12, 2022 4:24 AM UTC

Thanks for your response.

I need this in a Number component.

It has to be like Median(count(casetable, activity table, activity = 'name') /

count(distinct (table.column)))

For this I'm getting aggregation error.

​

No worries, Thank you for the inputs