Document toolboxDocument toolbox

Adding calculated measures

Applies to: Kyvos Enterprise  Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace

Kyvos Azure Marketplace   Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)


Note

Kyvos supports naming semantic model entities in the ENTITY_ format, such as DIMENSION_, DIM_, and MEASURE_, and so on.

Calculated measures are the expressions computed at run time to return values based on these expressions from the data stored in one or more measures. Kyvos supports MDX-based calculated measures.

Click the i icon next to the items in the Properties panel to learn more. 

Creating calculated measures or members on top of your base metrics from data sources is one of the key aspects of any semantic model. The expression language for creating calculated measures is MDX. MDX as a language is very powerful, especially for OLAP models. However, it may not be easy for many designers and business users to write calculations using MDX. To simplify this aspect of the product, we are introducing ‘Ask Kyvos Copilot’, a GenAI-driven service that assists semantic model and report designers in Kyvos by generating MDX calculations based on natural language descriptions. This service is processed on top of the OpenAI GPT-3.5-turbo Model. It enhances the overall user experience by facilitating the creation of calculations, offering a Quickstart for users unfamiliar with the MDX language, and enabling experienced users to generate skeletons for complex calculations.

All you need to do is provide natural language input about the MDX query, and an MDX query will be generated. This integration saves time and effort when creating MDX queries. For more details, see the Creating MDX expressions using Kyvos Copilot section.

To create an expression for a calculated measure, perform the following steps. 

  1. From the Toolbox area, select Semantic Models.

  2. Select a semantic model from the Semantic Models column, then click a measure from the Measures column, to view its properties.
    Or, add a measure if needed.

  3. Choose Expression and enter the default value of 0 for simple expressions or enter the solve order.
    Change the solve order if this expression needs to be calculated for use in another expression.

  4. Set the non-empty behavior to By Expression, By Measures, or By Measures Then Expression.
    If By Measure or By Measures Then Expression is selected, select the measure used to evaluate the expression. Type in the Search box to quickly find a measure or click a checkbox to select a measure from the list.
    This option can improve query performance because the calculation is only done if the values used in it are not empty.

  5. Enter an expression that uses MDX Linear syntax.
    See Creating expressions. 

  6. As you enter text, suggested functions, semantic models, dimensions, members, and so on, are displayed. Click a name, then press Enter to use that item.

  7. Click the Functions tab to see additional details about the functions.

  8. Use the Undo and Redo icons as needed as you create your calculated expression. 

  9. To find or replace content, click the Find/Replace icon (next to Undo and Redo) and enter text to search.

  10. Select the Match Case icon (Aa) if needed.

  11. If you want to replace the found value, click the arrow to the left of Find, enter the text to replace, and specify whether to replace all occurrences.

  12. To delete the entry for that item, click the X at the end of the line.

  13. Click Validate to validate your criteria. 
    If you have made changes and don’t want to keep them, click Cancel.

  14. Click Save.


Related topics

Copyright Kyvos, Inc. All rights reserved.