Please enable JavaScript to view this site.

 

Navigation: Developer Guide > Deploy the MPM Template App > Define Master Items in the Script

Add Additional Master Items to the MasterItems Repository

Scroll Previous Topic Top Next Topic More

 

All the master items that are used in the template app are defined in a .CSV file called MasterItems Respository.

 

Warning

The MasterItems Respositories columns uses semicolon (;) as separator! Do not change this.

 

The MasterItems Respository is filled with the master items automatically. This repository has the advantage of controlling all the master items centrally, and also, of having the possibility of importing the process mining measures and dimensions into other applications. If you want to add Master Items, you need to adapt the file.

 

The figure below shows you a comparison of what is entered in MasterItems Respository File and what you finally see in the front end after importing your data.

 

MasterItems table csv and front end_2

 

 

Do the following steps if you want to add new master measures or master dimensions:

 

1.Define a new _MasterItemID and fill the values in each column. To do this, follow the logic used in the other master items like in the example below. It’s pretty intuitive.

2.To leave a field value in null() or blank, fill it with the value <'%empty'>. If you require further information on the individual columns, please refer to the detail table at the end of this section.

3.Control, that the table MasterItems (line 67-71) can be loaded from it's source. Maybe you will need to adapt the library it is read from.

4.When you have defined and added all new master dimensions and master measures, you are ready to load the data. To do this, click the Load data button in the top right corner.

 

MasterItems Respository file looks like this (preview):

 

_Master-

ItemID

_MasterItem-

Label_EN

_MasterItem-

Label

_MasterItem-

Type

_MasterItemName

_MasterItemExpression1_EN

_MasterItemExpression1

_MasterItem-Description

_MasterItem-

Color

_MasterItem-Tags

_MasterItem-Expression2

_MasterItem-

Expression3

_MasterItem-

Expression4

_MasterItem-

Expression5

Scenario-

Flag

1010

='Share Cases'

only({<TextObject = {Measure_ShareCases_MasterItemID_1010}>} $(mvSelectedLanguage))

Measure

%Share Cases

count(distinct CaseID)/count({1} distinct CaseID)

num(

count(distinct CaseID)/count({1} distinct CaseID)

,$(mvNumFormatPercentage),

$(mvDecimalFormat),

$(mvThousandSepFormat)

)

 

<°%empty*>

<°%empty*>

MPM

<°%empty*>

<°%empty*>

<°%empty*>

<°%empty*>

MPM

1020

='Share Variants'

only({<TextObject = {Measure_ShareVariants_MasterItemID_1020}>} $(mvSelectedLanguage))

Measure

%Share Process Variants

sum(pathVariant_Counter)/sum({1} pathVariant_Counter)

num(

sum(pathVariant_Counter)/sum({1} pathVariant_Counter)

,$(mvNumFormatPercentage),

$(mvDecimalFormat),

$(mvThousandSepFormat)

)

<°%empty*>

<°%empty*>

MPM

<°%empty*>

<°%empty*>

<°%empty*>

<°%empty*>

MPM

1030

='Share Time'

only({<TextObject = {Measure_ShareTime_MasterItemID_1030}>} $(mvSelectedLanguage))

Measure

%Share AVG Lead Time

dual(
    if(interval(avg({1}TOTAL CaseLeadTime), 'd')>=interval(1, 'd'),
              interval(avg({1}TOTAL CaseLeadTime), 'd') & 'd',
       if(interval(avg({1}TOTAL CaseLeadTime), 'h') > interval(1/24, 'h'),
              interval(avg({1}TOTAL CaseLeadTime), 'h:mm') & 'h',
           if(interval(avg({1}TOTAL CaseLeadTime), 'm') > interval(1/1440, 'm'),
                             interval(avg({1}TOTAL CaseLeadTime), 'm:ss') & 'm',
             interval(avg({1}TOTAL CaseLeadTime), 's') & 's'))),
num(avg({1}TOTAL CaseLeadTime),'0.0', ',', '.'))

num(

dual(
    if(interval(avg({1}TOTAL CaseLeadTime), 'd')>=interval(1, 'd'),
              interval(avg({1}TOTAL CaseLeadTime), 'd') & 'd',
       if(interval(avg({1}TOTAL CaseLeadTime), 'h') > interval(1/24, 'h'),
              interval(avg({1}TOTAL CaseLeadTime), 'h:mm') & 'h',
           if(interval(avg({1}TOTAL CaseLeadTime), 'm') > interval(1/1440, 'm'),
                             interval(avg({1}TOTAL CaseLeadTime), 'm:ss') & 'm',
             interval(avg({1}TOTAL CaseLeadTime), 's') & 's'))),
num(avg({1}TOTAL CaseLeadTime),'0.0', ',', '.'))

,$(mvNumFormatPercentage),

$(mvDecimalFormat),

$(mvThousandSepFormat)

)

 

<°%empty*>

<°%empty*>

MPM

<°%empty*>

<°%empty*>

<°%empty*>

<°%empty*>

MPM

 

Details

 

The MasterItems table consists of nine columns:

 

Column Name

Explanation

_MasterItemID

An unique ID for the master item which is used to connect the master items between the front end and back end, to perform updates and to change the properties of a master item.

Start at 0001 and do not change the order.

You can find further explanations here.

_MasterItemLabel

The label expression in multilanguage-format which is used by the MPM Template App Multilanguage to be displayed on the chart axis when using the master item (Qlik Sense® September 2017 or later). To ensure the functionality of the multilanguage support please provide in this column the following value:

only({<TextObject = {TextObject}>} $(mvSelectedLanguage))

Please do not change the variable names between the brackets "§()". You only need to change the {TextObject}-value. Refer to Translate the Template App to a Custom Language for further explanation.

_MasterItemLabel_EN

The label expression in multilanguage-format which is used by the MPM Template App English to be displayed on the chart axis when using the master item (Qlik Sense® September 2017 or later). Here you do not need to follow any specific formular or convention. A simple english label is sufficient.

_MasterItemType

Either the "Measure" value (for numbers used for calculation) or the "Dimension" value (for categories).

_MasterItemName

The name of the master item, which is displayed in the master items panel.

_MasterItemDescription

The content of this description field is displayed when a master item is created.

_MasterItemColor

The HEX code to define the color of the master elemitemsents, which must be in the format "#000000". If you don't want to define a color, insert '<°%empty*>'.

_MasterItemTags

A list of terms that are used to tag the master item. Tags should be listed with a semicolon (;) as separator.

Please do not delete the tag ScriptMasterItem to distinguish the tags from those you create in the front end.

_MasterItemExpression1

The field name or expression for the measure or dimension used by the MPM Template App Multilanguage. Here you can set master dimensions, for example, by entering CaseDimension1 or perform calculations for the measures, for example, by inserting sum(CaseValue1). These entries have to be formatted by the num-function or the date-function, so they adapt their format to the choosen language. Refer to Translate the Template App to a Custom Language to get the formats right.

_MasterItemExpression1_EN

The field name or expression for the measure or dimension used by the MPM Template App English. Here you can set master dimensions, for example, by entering CaseDimension1 or perform calculations for the measures, for example, by inserting sum(CaseValue1). No additional num- or date-formatting is necessary here.

_MasterItemExpression2(2...n)

Additional fields, when required for a drill-down dimension should be added as extra columns using a sequential number in the field title.

 

© by MEHRWERK GmbH