Skip to main content

Hi Celopeers and Celonis team.

 

I have quite a conundrum that is bothering me quite a bit and I don't know what else to try.

 

I have a case-when kpi that creates a risk category for customers based on a set of parameters. It works perfectly for customer by customer basis.

 

But when I try to do any aggregations by the categories it always shows just one value.

 

In the below image you can see it in action. In one the KUNNR number is the dimension and the Category as the KPI, in the other, the Late payer is as dimension and COUNT(KUNNR) as a KPI.

Screenshotcategories

Hey @marcin.konop13 ,

 

could you please disclose your codings behind the two dimensions?

 

Thank you!

 

BR

Julia Bauer


Hey @marcin.konop13 ,

 

could you please disclose your codings behind the two dimensions?

 

Thank you!

 

BR

Julia Bauer

Hi. Thanks for the reply. The late payer category is a simple case-when based on 3 KPIs:

 

CASE

WHEN

(KPI("invoices_late_over_30_days",{p1})

/

KPI("KPI_INVOICE_SUM_OPEN_AR"))

<=0.1

AND

KPI("avg_days_late")<0

THEN 'Early payer 1'

 

WHEN

(KPI("invoices_late_over_30_days",{p1})

/

KPI("KPI_INVOICE_SUM_OPEN_AR"))

<=0.1

AND

KPI("avg_days_late")<=5

THEN 'On time payer 1'

(...)

ELSE 'Other'

END

 

--------------------------

 

The 3 KPIs its utilizing are:

 

"invoices_late_over_30_days":

SUM(

 CASE WHEN

 DATEDIFF(dd,${VAR_DUE_DATE_CALC},TODAY()) >30 + {p1}

 AND "BSEG"."AUGDT" IS NULL

 THEN "BSEG"."WRBTR_CONVERTED"

 ELSE 0

 END

)

 

-------------------

 

"KPI_INVOICE_SUM_OPEN_AR":

SUM(

CASE WHEN KPI("FORMULA_INVOICE_INDICATOR_IS_CLEARED") = 0.0 THEN

KPI("FORMULA_INVOICE_CALC_CONVERT_TO_REPORTING_CURRENCY",'${{currency}}',

'Amount')

ELSE 0.0 END

)

(This one is from the regular Celonis KM from the marketplace)

 

----------------------

 

"avg_days_late":

AVG(

 CASE WHEN

 DATEDIFF(dd,${VAR_DUE_DATE_CALC},TODAY()) >1

 AND "BSEG"."AUGDT" IS NULL

 THEN DATEDIFF(dd,${VAR_DUE_DATE_CALC},TODAY())

 ELSE 0

 END

)

 

--------------

 

PS: The {p1} variable is insignificant as the issue persisted even before I added the parameter.


Reply