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)
A calculated member is like any member of an existing attribute or user hierarchy. It has no data actually stored in the semantic model. Instead, calculated members are assigned an MDX expression.
You can add calculated members to a hierarchy using hierarchy or attribute properties.
Note
From Kyvos 2025.10 onwards, if FORMAT_STRING is applied in the calculated member's expression and the outermost response value corresponds to that calculated member with the highest solve order and FORMAT_STRING applied, then the final response measure value will apply the specified FORMAT_STRING format.
You can directly add a dimension to the semantic model that contains attributes not associated with any datasets and mark them as calculated dimensions, as mentioned below.
Kyvos supports naming semantic model entities in the ENTITY_format, such as DIMENSION, DIM_, and MEASURE_, and so on.
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.
From the Toolbox area, select Semantic Models.
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.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.Set the non-empty behavior to By Expression, By 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.
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.Enter an expression that uses MDX Linear syntax.
See Creating expressions.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.
Click the Functions tab to see additional details about the functions.
Use the Undo and Redo icons as needed as you create your calculated expression.
To find or replace content, click the Find/Replace icon (next to Undo and Redo) and enter text to search.
Select the Match Case icon (Aa) if needed.
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.
To delete the entry for that item, click the X at the end of the line.
Click Validate to validate your criteria.
If you have made changes and don’t want to keep them, click Cancel.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.
Calculated-Only Dimension Attribute Support
From Kyvos 2025.9 onwards, you can directly add a dimension to the semantic model that contains attributes not associated with any datasets and mark them as calculated dimensions. This enhancement allows you to:
Add, update, or remove calculated members on any attribute of a calculated dimension without requiring semantic model reprocessing.
Leverage attributes or levels of calculated dimensions in BI tools.
Apply filters on one or more attributes or members from these dimensions.
Work with calculated members that are not linked to any physical dataset.
Treat these members as unrelated members.
Use them without requiring a separate query.
To create calculated-only dimension attribute support, perform the following:
From the Toolbox area, select Semantic Models.
Select a semantic model from the semantic model's column, then click the attribute from the Dimensions column to view its properties.
In the Attributes Properties pane, select Based on as Calculations.
Click Calculated Members.
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.
Enter an expression that uses MDX Linear syntax.
Click Validate to validate your criteria.
If you have made changes and don’t want to keep them, click Cancel.Click Save.
Drag the attribute to the Dimension or Measure column and process the semantic model. After processing, you can change the dynamically calculated members at runtime without reprocessing the model.
Dynamic formatting support for calculated members
If FORMAT_STRING is applied in the calculated member's expression and the outermost response value corresponds to that calculated member with the highest solve order and FORMAT_STRING applied, then the final response measure value will apply the specified FORMAT_STRING format.
To apply dynamic formatting, perform the following steps.
From the Toolbox area, select Semantic Models.
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.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.Enter format to apply to the dynamic expression.
Click Save.
Related topics