Creating expressions using MDX Linear syntax
Applies to: Kyvos Enterprise Kyvos Cloud (SaaS on AWS) Kyvos AWS Marketplace
Kyvos Azure Marketplace  Kyvos GCP Marketplace Kyvos Single Node Installation (Kyvos SNI)
Kyvos enables you to define measure values that can be calculated using expressions in MDX Linear syntax.
For example:
([Measures].[Field1] + [Measures].[Field2])
As you type, the auto-complete feature shows semantic model names, available dimensions, measures, and MDX functions.
Kyvos supports 'Ask Kyvos Copilot', which uses a Large Language Model (LLM) to create MDX queries from natural language. With this feature, you no longer need to refer to the MDX documentation to get help with writing MDX expressions. All you need to do is provide natural language input, 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 Copilotsection.
To use the MDX editor when creating calculated measures in semantic models, perform the following steps:Â
Create or edit an existing semantic model.
Choose to create a new measure.
In Measure Properties, select Expression.
On the Expression dialog box, specify the solve order if needed, and select a behavior for non-empty cells. Click the i icons to learn more.
To manually write an MDX expression, start typing an expression in the editor section of the dialog box. 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.
-or-
To Create MDX queries from natural language, click Ask Kyvos Copilot.To use Ask Kyvos Copilot,
Click the Ask Kyvos Copilot link. The Calculations using Kyvos Copilot dialog is displayed.
On the Calculations using Kyvos Copilot dialog, you can do the following:
Category: Select the required type of category for calculations, such as General Calculations, Arithmetic Calculations, or Time-series Calculations. To ensure greater accuracy in the generated MDX, it is important to choose the appropriate category.
Sample Input: When selecting a category, use the Sample Input displayed on the right side of the dialog.
Use Me: Hover over the sample input shows the Use me or Copy to Clipboard options. To use the sample input for calculations, click the Use me option. The selected sample input is displayed in the Input Prompt field.
Copy to Clipboard: You can also copy the sample input using the Copy to Clipboard option.
History: The history of the last 30 days is stored and can be filtered by category or custom text. You can also reuse previous inputs and outputs to create new expressions.
Click Generate. The MDX output is then generated accordingly.
Click Accept. The MDX expression is displayed in the Calculated Measures dialog box.
Tip
You can access and read important information using the Help icon before using Ask Kyvos Copilot.
You can also see a description of the selected function.
To view a list of functions along with the detailed description, navigate to the Functions tab and select a function from the list.
Tips
Double-click on the dialog header to access the full-screen mode.
Use the Undo and Redo icons as needed as you create your calculated expression.Â
To find or replace content, click the Find/Replace icon, and enter what to find.
Select 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.
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.
To learn more about MDX query fundamentals, see Microsoft Documentation.
To learn about the syntax elements and language references, see Microsoft Documentation.
Related topics
Â
Copyright Kyvos, Inc. All rights reserved.