Skip to main content

Hello Celopeers,

 

im new to Celonis and have created a view. There i use a Kpi which drops a lot of zero values. When trying to filter them out i always get the error that aggregated functions can not be used in combination with the FILTER function, and that i should try PU functions.

 

The KPI i'm using is this:

SUM(

 CASE

  WHEN round_day("o_custom_KnotenpunktAuftrag"."AusgangForecast") = round_day("o_custom_KnotenpunktFuellstand"."Date")

  THEN 1

  ELSE 0

 END

)

or alternetively this :

 

COUNT(DISTINCT

case when round_day("o_custom_KnotenpunktAuftrag"."AusgangForecast")

 =round_day("o_custom_KnotenpunktFuellstand"."Date")

 then

  "o_custom_KnotenpunktFuellstand"."KnotenpunktAuftrag_ID"

end)

 

is simply want to calculate for each KnotenpunktFuellstand.Date, how many Order.IDs i have where the filter condition is met.

So i can have a table where im using the date plus KPI to see, how many outgoing orders i can except for each date.

 

How can i have a row-count, based on a condition formulated as a PU function so i can filter the KPI?

 

PU_COUNT ("o_custom_KnotenpunktAuftrag", "o_custom_KnotenpunktFuellstand"."ID")

Trying something like this just give me back for each ID how often it finds each ID in o_custom_KnotenpunktAuftrag.

 

Kind regards,

Niklas

 

Hi Niklas, using a PU_COUNT_DISTINCT function here with a domain table may work here. I was thinking something like PU_COUNT_DISTINCT (
    DOMAIN_TABLE(ROUND_DAY("o_custom_KnotenpunktFuellstand"."Date")),
    "o_custom_KnotenpunktFuellstand"."KnotenpunktAuftrag_ID",
    FILTER round_day("o_custom_KnotenpunktAuftrag"."AusgangForecast") = round_day("o_custom_KnotenpunktFuellstand"."Date")
)
Id recommend viewing the documentation for domain tables if you’re new to celonis, they can be quite handy!


@atharva.patil12 Thank you very much! 
The Domain Table was the way to go. I still had to inculde the other columns of the table i displayed in the Domain table, so that it calculates on each relation.

Still im a bit confused how the domain table in the PU context works..
how can   "o_custom_KnotenpunktFuellstand"."KnotenpunktAuftrag_ID" be found in the domain table, even if i don’t include it. I tried incluing it as well but then i just got 1 on every relation.

 


Reply