Skip to main content

Celonis Product Documentation

Example: Base KPI
 - id: NET_SALES_VALUE_SINGLE_SUM_VARIABLE_TIMEFRAME_BASE   
    displayName: Net Sales   
    pql: |     
        SUM(       
            CASE          
                WHEN ${SALES_TIMEFRAME_VARIABLE_BASE} <= {p1}         
                AND ${SALES_TIMEFRAME_VARIABLE_BASE} >= {p2}         
                THEN KPI(VBAP_CURRENCY_CONVERSION)         
                ELSE 0.0       
            END     
           )   
    unit: " ${{to-currency}}"   
    format: .3s   
    parameters:     
        - id: p1       
            displayName: lower limit       
            description: Furthest time in the past, eg. 12 would represent 12 months into the past       
            defaultValue: 12     
        - id: p2       
            displayName: upper limit       
            description: Closest time in the past, eg. 1 would represent 1 month in the past       
            defaultValue: 1   
    desiredDirection: NONE   
    priority: false

Item

Description

NET_SALES_VALUE_SINGLE_SUM_VARIABLE_TIMEFRAME_BASE

The Base KPI; this is often denoted by adding the suffix _BASE to a KPI name.

SALES_TIMEFRAME_VARIABLE_BASE

Returns the months between the Sales Order Goods Issue date {p1} and the Last Load Date {p2}.

Parameters {p1} and {p2} can be amended in your app according to your use case.

VBAP_CURRENCY_CONVERSION

A previously-defined KPI that stores the Sales Order Item value: