Skip to main content
Question

Self join a table to get a 1:N relationship and compare a KPI value within a dimension

  • May 24, 2023
  • 2 replies
  • 7 views

dany.moual11
Level 5
Forum|alt.badge.img+7

Hello ,

 

I would like to implement a KPI showing the relationship within the element of a dimension (B) for each fixed element of a first dimension A and display it as shown below:

 

A | B | B (again) | KPI

 X | 2001|  2002 | 5

 X | 2001| 2003 | 2

 X | 2002| 2001 | 100

 X | 2002| 2003 | 2

.....

 Y | 2001| 2002 | 50

 Y | 2001| 2003 | 25

 Y | 2002| 2002 | 20

 Y | 2002|  2003 | 25

 ...

The aim is to be able to determine for each dimension in A, and a given fixed dimension in B, which other dimension within B is very different in terms of KPI value.

 

Any idea about how to inplement something like this using PQL?

 

Thanks for your help

 

2 replies

  • Level 8
  • May 26, 2023

Have you tried the any of the process functions. https://docs.celonis.com/en/process.html, I have used Activity_Lag and Activity_Lead to get proceeding and future nodes of an Activity. Then filtering out using some matching conditions.


dany.moual11
Level 5
Forum|alt.badge.img+7
  • Author
  • Level 5
  • May 26, 2023

Hi Sunny.

Thanks for the answer. Unfornatly, it ist not about the activity table so that I can use Activity_Lag and Lead. I am using actually the Material plant data table and there is no Lead or Lag activity envolve.