MicroStrategy ONE

Define a column expression in Query Builder

Column expressions inserted in the SELECT clause of your SQL query can be defined using Query Builder. In the Query Builder Editor, you can define a column expression using the Column Expression Editor.

Access the Column Expression Editor

  1. Access the Query Builder Editor.

  2. Select a column. A column is created in the Selections pane (the bottom pane on the right).

  3. Right-click a column and select Edit Column Expression.

Define a column expression

In the Column Expression Editor, you can define the column expression in the following ways:

  • Add a column

    In the Object Browser, browse to the Query Builder Tables folder. This folder displays the tables you have included for your Query Builder reports. To view the columns for each table, click the plus (+) sign to expand the table definition. Double-click a column to add it to the column expression, or select the column and drag it into the definition window on the right side of the Column Expression Editor.

  • Use the selection bar

    • Click the operators available on the selection bar (( ), +, -, *, and /), as needed, to define the column expression.

    • To delete the column expression and begin again, click Clear.

    • Click Validate to check the validity of your newly defined column expression. The Column Expression Editor displays the Validation status on the lower-left corner of the Definition window.

All of the modifications available in the Column Expression Editor can also be achieved by manually typing in the desired column expression. If you type the column expression, click Validate to check the validity of your newly defined column expression.

  • Save the definition: To save the modifications to the column expression and exit the Column Expression Editor, click OK.

  • Cancel changes: To cancel any changes made to the column expression and exit the Column Expression Editor, click Cancel.