Skip to main content

Build WHERE Clause

The WHERE clause editor, located at the bottom of the Data Source Editor, is used to filter the data loaded into the cube by applying SQL conditions. This filtering ensures only relevant records are processed during cube builds or refreshes, which can improve performance and reduce cube size.

Add a WHERE clause

  1. In the WHERE clause editor, click inside the text box.
  2. Type the SQL expression for your condition.
  3. Click the pencil icon on the right to open advanced settings with tools for building expressions.
  4. Use the available keywords, tables, or code helpers to complete your logic.
  5. Click Validate to check if the expression syntax is correct.
  6. Click Save.
  7. In the Options panel, select Save Data Source.

WHERE clause fields

FieldDescription
Script boxText area for entering the SQL condition to filter cube data.
Code helpersTool buttons above the script editor that insert operators, brackets, or keywords quickly.
Scripts KeywordsTabs that group building blocks for your expression:

  • Functions – Perform standard calculations or data transformations using math or text functions.
  • BI Functions – Apply business intelligence logic, such as period-over-period comparisons or trend analysis.
  • Statements – Control the logic and structure of your expression such as CASE for conditional rules.
  • Operators – Add, compare, assign, or combine values using logical or arithmetic symbols.
  • Constants – Insert fixed values that do not change, such as numerical thresholds or static text.
  • Objects – Use advanced elements such as Hyperlink or special script functions to enhance interactivity or dynamic output.
TablesList of tables available in the data source to use in the script.
OthersAdditional elements such as:

  • Global Variables – Predefined global values.
  • Special Variables – Context-sensitive or system-generated values.
ValidateAction that checks whether the script is correctly written and executable.