Skip to main content

Im trying to create a number KPI that gives the % of cases contained in the top n variants. This would be the number shown in the variant explorer as the % of cases contained in the variants selected (for example, when dragging down to the top five variants in variant explorer, the bubble at the bottom says 72%. I want to use that 72% in a calculation.). I want to be able to use this number in other calculations. Id like for this to be static (not subject to filtering), which I know how to do. Are there internal variables that contain this and other information that is used to create the graphics?

I found this reference but its not of much help. I cannot get to the page in any case. Percentage of cases covered by the 5 most common variants - #3 by gvanenis

How would I use the INDEX_ORDER syntax to calculate the KPI Im looking for? Thanks in advance for your help.

Hi @joe.misli,

 

You could try to use the following PQL snippet. As I would require some further information, it would be great if you could test it and share your feedback! This example is from our standard O2C connector:

 

AVG (

  CASE

    WHEN

      BIND (

        "VBAP" ,

        INDEX_ORDER (

          PU_COUNT (

            DOMAIN_TABLE ( SHORTENED ( VARIANT ( "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" ) , 2 ) ) ,

            "VBAP"."VBELN"

          ) ,

          ORDER BY (

            PU_COUNT (

              DOMAIN_TABLE ( SHORTENED ( VARIANT ("_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" ) , 2 ) ) ,

              "VBAP"."VBELN"

            ) DESC )

        )

      ) < 6

    THEN 1

    ELSE 0

  END

)

 

Best,

 

Justin


Hello Joe,

 

You're right about using INDEX_ORDER, but you need to complement with some other PQL functions, including VARIANT() and PU functions.Fortunately, someone already solved this. You can find a detailed step by step example (#13 to 15-Advanced Example: Case Coverage) on the following documentation

celonis.cloud/help/display/CIBC/INDEX_ORDER

Best,

Gabriel


Reply