Create a AVG/Median switch for PPIs
In process mining, process performance indicators (PPIs) such as lead time, automation rate or conformance rate can be analyzed using either the average (AVG) or median value.
One approach is to set the script variable mvCustomizedAVGMedian
to either 'AVG' or 'Median' directly in the script, ensuring the selection is applied at load time. Alternatively, you can define the selection at load time using the AVG/Median dropdown in the mpmX Import Wizard (see Advanced Customizations).
Another method is to implement the switch dynamically at runtime using a variable input button, allowing users to interactively toggle between AVG and Median within the app. This guide will lead you through the process of configuring such a switch.
Steps to Implement an AVG/Median Switch
-
Adding a Variable input
-
Open your mpmX App where you want to implement the toggle.
-
Navigate to the Custom Objects > Qlik Dashboard bundle section in the left-hand panel.
-
Drag and drop the Variable input object onto the desired worksheet.
-
-
Configuring the Variable input
-
In the Appearance panel on the right, locate the Variable settings.
-
Set the Name field to
mvCustomizedAVGMedian
. -
Choose Buttons as the display option (Alternatively, you can select a Drop Down menu).
-
-
Defining Values for the Variable
-
In the Values section, select Fixed as the value type.
-
Add two fixed values:
-
AVG: Value = AVG, Label = AVG
-
Median: Value = Median, Label = Median
-
-
Press the Done editing button and test the AVG/Median button.
-
As a result, all PPIs that use AVG or median as aggregation should now switch between these two definitions. The change then applies globally via the app, which is why it may be useful to copy the implemented button to other worksheets.
