Expressions and KPIs /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis section 2024-08-02T13:54:26+02:00 # Expressions and KPIs In **Report Designer**, you can create Expressions and KPIs to save time when you are building your reports. KPIs /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/kpis section 2026-01-16T14:27:01+01:00 # KPIs *KPIs* can be created and managed through the **Report Designer** menu under **KPIs**. ![](./img/en/image012.png) A KPI is a calculation/key figure that you can reuse across multiple reports. KPIs are used in the same way as measures (amount, quantity). Instead of dragging an amount or quantity into the report, you drag out the complete KPI. KPIs can be based on: - Expressions (simple or complex selection of dimensions) - Measures (amount, quantity) #### KPIs based on expressions - When a KPI is based on an expression, it must include information about which measure (amount, quantity) it will have an effect on. Example: GrossProfit is Sales -- Costs. When creating this KPI, it will be significant whether you choose the actual amount or budget amount as your measure. - A KPI has a formula. The formula is based on expressions and normal mathematical operators (+, -, /, \*) and constants. - It is also possible to add period functions to a KPI. #### KPIs based on measures - For KPIs based on measures, you must select a Factset (module) that the measures you want to use are included in. For example, if you want to use the *Net amount* from General Ledger, you must select the General Ledger factset. An example of a measure-based KPI is *average price*, which is the amount divided by quantity. ![](./img/en/KPIs.png) From the **KPI** dialog, you have access to the following options to manage the KPIs: | **Button** | **Function** | |---|---| | ![](./img/en/image005.jpg) | Click to create a new KPI group. In the **KPI Groups** dialog, make sure to enter a KPI group name before starting to select values for the KPI. You may also enter a description for the KPI. | | ![](./img/en/image006.jpg) | Click to open the **KPI Groups** dialog and edit the currently selected KPI group. | | ![](./img/en/image007.jpg) | Click to delete the selected KPI group. | | ![](./img/en/image008.jpg) | Click to create a copy of the selected KPI group. The newly created expression group may be modified with the **Change...** function. | | ![](./img/en/image009.jpg) | Click to open a network browser window and import a KPI group. Valid files are other OSR expressions with the \*.xml format. | | ![](./img/en/image015.jpg) | Click to open a network browser window and export a KPI group to the location. The newly exported expression group will be in the \*.xml format. | Use KPIs in reports /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/kpis/use-kpi-in-reports page 2024-08-02T13:54:26+02:00 # Use KPIs in reports You can use KPIs in the same manner as any other measure; instead of dragging an amount or quantity into the report, you drag out the complete KPI. To use a KPI in a report; 1. In the **Report Designer** menu, click **KPI**. 2. Click the KPI you want to use, and drag it into your report. ![](./img/en/word-image-5771-1-1024x481.png) Examples: Create Expressions and KPIs /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/examples-use-of-expressions-and-kpis section 2024-07-04T17:39:28+02:00 # Examples: Create Expressions and KPIs To illustrate the creation of expressions and KPIs, we will look at some examples. First, we will create two expressions called *INCOME* and *COGS*. We will then create a KPI called GROSS MARGIN % which uses these two expressions to show the gross margin in %. Finally, we have an example where we create a KPI based on measures. Create KPI based on Expressions /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/examples-use-of-expressions-and-kpis/combine-expressions-income-and-cogs-in-the-kpi-grossmargin page 2024-08-07T11:22:23+03:00 # Create KPI based on Expressions In this example, we create a KPI that shows gross margin in %. This KPI will be based on the expressions *INCOME* and *COGS*. 1. In the **Report Designer** menu, select **KPIs** and then **Manage KPIs**. ![](./img/en/word-image-5660-1.png) 2. In the dialog that opens, click **New**. 3. In the next dialog, enter a KPI group name (in the example *Financial KPIs*). You can also add a description. 4. Click **Add** and enter a name of the KPI; *GROSS MARGIN %*. You may also enter a comment. ![](./img/en/word-image-5660-2.png) 5. This KPI will be based on expressions, so make sure that the **Based on Expressions** option is selected. Next, you must indicate which measure the expressions that will be included in the KPI are based on. 6. Click the **Edit measure** button in the *Measure* box. 7. Find and select the measure that the expressions *INCOME* and *COGS* are based on. In our case, this is **Net Amount** (under *General Ledger Transactions)*. 8. Click **OK** to confirm. ![](./img/en/word-image-5660-3.png) 9. Click the **Edit** button in the **Formula** field. ![](./img/en/word-image-5660-4.png) The **KPI Editor** opens: | | **Name** | |-----|--------------------| | 1 | Expressions | | 2 | **Formula** area | | 3 | **Operators** area | The KPI *GROSS MARGIN %* will consist of the expression *INCOME* minus the expression *COGS* divided by *INCOME* to get the result in percent. The formula will look as shown in the figure below: ![](./img/en/word-image-5660-6.png) 10. To build the formula, perform the following steps: a. In the **Operators** section, click **(** (left parenthesis) twice. b. Drag the expression *INCOME* into the **Formula** area*.* c. In the **Operators** area, click **\*** (multiply by) and type -1. This is to convert the income amounts that are negative in the ERP system into positives so that the entities that will be calculated are both positive in order to give the correct result. d. In the **Operators** area, click **)** (right parenthesis). e. In the **Operators** area, click **--** (minus). f. Drag the expression *COGS* into the **Formula** area*.* g. In the **Operators** area, click **)** (right parenthesis). h. In the operation section, click **/** (divide by). i. Drag the expression *INCOME* into the **Formula** area. j. In the **Operators** area, click **\*** (multiply by) and type -1. (Again to convert the income amounts into positives.) k. In the **Operator** section, click **)** (right parenthesis). l. Click **OK** to confirm. 11. Click **OK** and then **Close** to exit the **KPI** dialog. Create KPI based on Measure /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/examples-use-of-expressions-and-kpis/create-kpi-based-on-measure page 2024-08-02T13:54:26+02:00 # Create KPI based on Measure In this example, we create a KPI based on measures. This time, we will create a KPI that divides a *Line Amount* measure by a *Quantity* measure. 1. In the **Report Designer** menu, click **KPIs** and then click **Manage KPIs**. ![](./img/en/word-image-5770-1.png) 2\. In the **KPI** dialog, click the **Financial KPIs** group that you created in the previous example. 3\. Click **Change**. ![](./img/en/word-image-5770-2.png) 4\. Click the **Add** button to add a new KPI. 5\. In the **Name** field, enter a name. In this example, we have named the KPI *Average amount*. 6\. Select the **Based on Measure** option. 7\. Click the **Edit** button. ![](./img/en/word-image-5770-3.png) 8\. In the **KPI Editor**, take the following steps: a\. Open the **Sales** module, and the **Receivable Invoice Lines** folder. b\. Drag the **Line Amount** measure into the **Formula** area. c\. Click the **Divide by** button (/). d\. Drag the **Quantity** measure into the **Formula** area. e\. Click **OK**. ![](./img/en/word-image-5770-4.png) 9\. In the **KPI** dialog box, click **OK**. 10\. In the **KPI group** dialog, click **Close**. The KPI is now created and ready to use in reports. ![](./img/en/word-image-5770-5.png) Create expressions: INCOME and COGS /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/examples-use-of-expressions-and-kpis/create-expressions-for-income-and-cogs page 2024-08-02T13:54:26+02:00 # Create expressions: INCOME and COGS 1. In the **Report Designer** menu, click **Expressions** and then **Manage Expressions**. ![](./img/en/word-image-5653-1.png) Expressions are organized in groups, so you must first create a group. 2\. Click **New** to create a new expression group. (Our two expressions *INCOME* and *COGS* (Cost of Goods Sold) will be added in this group.) ![](./img/en/word-image-5653-2.png) 3\. In the **Expression Editor** dialog, enter an expression group name. (In the example we use *Financial Expressions*.) 4\. Click the **Add** button. 5\. Replace the default text *New expression* with the name of the first expression; *INCOME*. ![](./img/en/word-image-5653-3.png) 6\. Click the **INCOME** expression. 7\. Locate your account dimension and drag it into the **Filters** area. 8\. Click the **Lookup** button and select the required accounts that should be part of the *INCOME* expression. (In this example, accounts 200:270.) ![](./img/en/word-image-5653-4.png) 9\. Click the **Add** button again and name this expression *COGS*. 10\. Repeat the process of dragging your account dimension into the filter area and enter the relevant account information. (In the example, account 310.) ![](./img/en/word-image-5653-5.png) 11\. Click **OK** to confirm and exit the dialog. 12\. Click **Close** to exit the **Expressions Groups** dialog*.* ![](./img/en/word-image-5653-6.png) Expressions /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/expressions section 2026-01-16T14:27:01+01:00 # Expressions *Expressions* can be created and managed through the **Report Designer** menu under **Expressions**. ![](./img/en/image001.png) Using Expressions is a way of referring to dimension values outside single reports and is typically used to refer to a selection that will be used in multiple reports. By using an expression instead of an ordinary selection within the report, you can easily update multiple reports by editing the expression instead of having to edit each report individually. For example, if you add an account to your general ledger and you need to include this new account in your reports, it is very time-consuming having to open multiple reports and making sure the new account is included in the selection. If, however, you use an expression and you need to add an account, you simply edit the expression, and all the reports where this expression is used will automatically be updated. It is possible to create expressions on all dimensions and multiple dimensions can be combined in one expression. Expressions are organized in groups. An expression group can consist of one or multiple expressions. ![](./img/en/Expressions.png) From the **Expression Groups** dialog box, you have access to the following options to manage expressions: | Button | Function | |---|---| | ![](./img/en/image005.jpg) | Click to create a new expression in the **Expression** dialog. Make sure to enter an expression name before starting to select fields for the expression. You can also enter a description for the expression. | | ![](./img/en/image006.jpg) | Click to open the **Expression** dialog and edit the currently selected expression group. | | ![](./img/en/image007.jpg) | Click to delete the selected expression group. | | ![](./img/en/image009.jpg) | Click to open a network browser window and import an expression group. Valid files are other OSR expressions with the \*.xml format. | | ![](./img/en/image015.jpg) | Click to open a network browser window and export an expression group to the location. The newly exported expression group will be in the \*.xml format. | ### Expressions and Chart of Accounts You can also use the predefined Expressions from the chart of accounts you have set up in [Chart of Accounts](./../../../../chart-of-accounts) . > [!TIP] > The expressions from *Chart of Accounts* can be edited in the *Chart of Account*s module in the portal. Use expressions in reports /onestopreporting/help/report-designer/creating-reports/expressions-and-kpis/expressions/use-expressions-in-reports page 2026-01-16T14:27:01+01:00 # Use expressions in reports To use an expression instead of creating an ordinary selection/filter, you do the following: 1. Drag out the relevant dimension from the list of dimensions as usual (for example, **Account**). 2. In the **Layout Editor**, click the X button to delete the filter that was created when you dragged in the dimension. 3. Open **Expressions** from the **Report Designer** menu and drag the relevant expression into the filter area. ![](./img/en/word-image-5764-1-1024x548.png) > [!TIP] > You can edit expressions that are created from the *Layout Editor*; click the *Edit Tree* button to go to the *Expressions Editor*.