/
Adding calculated members

Adding calculated members

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

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


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.

Note

  • Kyvos supports naming semantic model entities in the ENTITY_format, such as DIMENSION, DIM_, and MEASURE_, and so on.

  • From Kyvos 2024.12 onwards, filtering for calculated members is supported.

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

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 model's 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 ExpressionBy Measures, or By Measures Then Expression.

    • By Expression: The expression must evaluate itself to determine whether the calculated measure is empty.

    • By Measures: When you specify one or more measures in the list, the calculated measure is treated as empty if all the specified measures are empty.

    • By Measures Then Expression: The calculated measure is considered empty if all the specified measures are empty or if the expression evaluates to an empty value.

  5. 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.

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

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

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

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

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

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

    6. 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.

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

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

  8. Click Save.

Filtering Calculated Members in MDX and SQL for No-Spark

You can select one or more calculated members from the filter list, just like any other data members. Calculated members are displayed in the filter list on Kyvos and third-party BI tools. In the Filter pane, select the calculated member you want to use as a filter.

To filter calculated members, set the value of the kyvos.query.calculated.member.filter.enabled property to true.

image-20241226-080759.png

 


Related topics

Copyright Kyvos, Inc. All rights reserved.