Skip to main content
Nov 23, 2021 2:13 AM UTC
Question

Ignore a dimension filter in a KPI calculation

Hi All,

 

I have a date dimension and a related KPI (Using Running_Total). What we'd like to be able to do is to filter the date dimension shown in the component (e.g Last 20 days), but still have the KPI calculation based on the full dataset (ie. ignore the date filter).

 

thanks

David

14 replies

Level 0
Nov 23, 2021 7:51 AM UTC

Hi David,

 

I am not quire sure what exactly you want to achieve. Could you provide more detail or a screenshot potentially so we can help you with this request? How do you want to filter only the date dimension? In case you are applying a component filter, every information within that component gets filtered based on what you define.

 

Best

Kevin

Nov 23, 2021 8:21 AM UTC

@kevin.flesc​, as far as I understood, the problem lies in the kpi, when using running_total, the resulting value is referring to the previous values (intermediate aggregations).

When filtering the dates, the target is to show only the filtered months, but to show in the kpi the total value of the aggregation (including the out filtered rows).

So far, now filtering the running_total per month starts to add with the first filtered row.

 

The first idea I had was to aggregate a variable(previous_sum) to the running_total, this variable will be set with the filtered out row's sum. I don't know whether this is achievable within the studio, maybe some experience celopeers with ML_workwench like @joos.buijs​ or @janpeter.van.d​ can help us.

The problem statement would be, using the change date picker as a trigger, calculate a sum(rows) of specific rows and then store the result in a variable previos_sum

 

What do you think?

 

Nov 23, 2021 9:05 AM UTC

Hi all,

 

Could it be that the GLOBAL operator is wat you are looking for? Please have a look at the documentation of it: https://help.celonis.cloud/help/x/yYZRAQ. It creates an aggregation without being impacted by selections.

 

Kind regards,

Jan-peter

 

Level 0
Nov 23, 2021 9:17 AM UTC

Hi David,

Making the value a CONSTANT() should also be effective.

To aggregate all values from a source column to a single value, the CONSTANT

 function can be used as a target table inside a PU-function. The resulting value is a constant.

 

Example:

Calculate the average of the case table values using 

CONSTANT. In contrast to the regular AVG function, and like in all PU-functions, FILTERs are ignored:

PU_AVG ( CONSTANT ( ) , "caseTable"."value" )

 

Best,

Gabriel

Nov 23, 2021 10:49 AM UTC

Hi Kevin, Javier, Jan-peter, Gabriel

 

Thanks all for your suggestions.

@kevin.flesc​ . Our requirement is similar to the requirement in this link from Celonis describing the behaviour of RUNNING_TOTAL. The additional requirement we have is to be able to filter the date range displayed, but preserving the KPI calculation:

 

https://pql.eu-1.celonis.cloud/process-mining/public/105139f8-2fa6-4ef2-b2e0-c33299e3f7e7/#/frontend/documents/105139f8-2fa6-4ef2-b2e0-c33299e3f7e7/view/sheets/17480c67-60f9-461e-a1c6-fc24a70ce20f

 

@janpeter.van.d​ @gabriel.okaba11​ Both good suggestions. I'll have to see if I can work out a way to adapt the approach used in the link above to use PU-functions.

 

@javier.donos​ I hadn't thought about using ML Workbench, but that may be a great fallback option. thanks.

 

I'll keep you all informed as to how we go. If you have any further ideas to try, please let me know.

 

thanks all

David

 

 

Nov 23, 2021 11:07 AM UTC

Hi Kevin, Javier, Jan-peter, Gabriel

 

Thanks all for your suggestions.

@kevin.flesc​ . Our requirement is similar to the requirement in this link from Celonis describing the behaviour of RUNNING_TOTAL. The additional requirement we have is to be able to filter the date range displayed, but preserving the KPI calculation:

 

https://pql.eu-1.celonis.cloud/process-mining/public/105139f8-2fa6-4ef2-b2e0-c33299e3f7e7/#/frontend/documents/105139f8-2fa6-4ef2-b2e0-c33299e3f7e7/view/sheets/17480c67-60f9-461e-a1c6-fc24a70ce20f

 

@janpeter.van.d​ @gabriel.okaba11​ Both good suggestions. I'll have to see if I can work out a way to adapt the approach used in the link above to use PU-functions.

 

@javier.donos​ I hadn't thought about using ML Workbench, but that may be a great fallback option. thanks.

 

I'll keep you all informed as to how we go. If you have any further ideas to try, please let me know.

 

thanks all

David

 

 

Hi @david.van.d11​,

 

Thanks for sharing this running_total example, I didn't see it before.

Regarding the GLOBAL operator, you can just put in front of an aggregation function (SUM in this case), and that should be it (no PU-functions required). Not sure if it also works for CASE WHEN situation, but that's something to find out.

 

Good luck,

Jan-peter

Nov 23, 2021 11:12 AM UTC

Hi @janpeter.van.d​ 

 

I tried that approach with the GLOBAL operator earlier today. Didn't work. All column values became the same.

I'm still learning, but I think the GLOBAL operator is syntax sugar for DOMAIN with a single value resulting table. Will continue to investigate.

 

thanks

David

Nov 23, 2021 11:13 AM UTC

@david.van.d11​ , I' am also trying and so far not successful, sill struggling😥

Nov 23, 2021 11:49 AM UTC

@david.beche12​ 

 

Hi David,

 

Is the linked analysis above yours? If so, would you be able to assist?

 

thanks

David

Nov 23, 2021 2:16 PM UTC

Hi @janpeter.van.d​ 

 

I tried that approach with the GLOBAL operator earlier today. Didn't work. All column values became the same.

I'm still learning, but I think the GLOBAL operator is syntax sugar for DOMAIN with a single value resulting table. Will continue to investigate.

 

thanks

David

Bummer, I'm out of options then. Using ML Workbench would be an option, but I guess also a bit of an overkill. Also, since the data from the OLAP table is extracted, still the same issue will exists problaly, that the filters will be applied to the target calculation.