Edit Expression Dialog

The Edit Expression dialog is opened by selecting the Add button below the expressions list in Chart Properties: Expressions or by right-clicking an existing expression and selecting Add Expression or Edit Expression.

Though it is primarily used in chart expressions, the same dialog is also utilized for building or editing other expressions wherever expressions are needed. It is universally accessed by clicking the button with the three dots symbol that can be found next to text edit boxes throughout the program.

The main parts of the dialog are made up of the Expression edit area that can be resized to accommodate large expressions and beneath this, the tab area consisting of the four tabs Fields, Functions, Variables and Images.

Expression OK This is the edit area for the selected expression. Type in the whole expression here, but it is often convenient to do most of the expression building in the tab area described below.
The label Expression OK is only displayed as long as the expression syntax is accepted by the program, i.e. while the expression is valid. Otherwise the label will display one of several error messages (Bad fieldname(s), Error in expression, Garbage after expression). There is little point in leaving the dialog by clicking the OK button, unless the expression is valid.

Fields

The Fields tab holds controls that are used for creating statistical aggregation functions based on field data.

Aggregation The first drop down contains a list of available statistical aggregation functions. (The functions First String and Last String can e.g. be used for showing text in a pivot table.)
Table This drop-down list allows you to limit the fields displayed in the Field list below to one specific internal table.
Field

This drop down contains a list of available field names.

Fields loaded as MEASURE using the Direct Discovery function are marked with [Measure]. MEASURE fields can only be used with basic aggregation functions Sum, Avg, Count, Min, and Max. For more advanced use or database specific functions you can use the SQL statement to execute a valid SQL function, with the limitation that you can only reference a table or view loaded with Direct Discovery .

Show System Fields Check this alternative in order to include the system fields in the Field list.
Distinct Statistical functions are by default calculated on number of occurrences. By checking the Distinct option, the expression will be calculated without duplicate values.
Paste Click this button in order to enter your selections as a component of the expression.

Functions

The Functions tab holds controls that are used for entering general QlikView-functions into the expression.

Function Category This drop-down list allows you to limit the functions displayed in the Function Name list below to a single category at a time.
Function Name This drop down contains a list of all available QlikView-functions (except a limited number of dedicated script functions).
The pane at the bottom of the functions tab displays the argument syntax of the selected function.
Paste Click this button in order to enter your selections as a component of the expression.

Variables

The Variables tab holds controls that are used for entering QlikView-variables into the expression.

Variables This drop down contains a list of all variables currently defined for the document.
Show System Variables Check this alternative in order to include the system variables in the Variables list.
Paste Click this button in order to enter your selections as a component of the expression.

At the bottom of the Variables tab is a pane displaying the current value of any variable selected in the Variables list.

Images

The Images tab holds controls that are used for accessing the internal files that are available in QlikView. It is also possible to access other associated image files. Note that this functionality is limited to certain parts of the layout.

Image Folder This drop down contains a list of available image folders.
Image This drop down contains a list of available images in the selected folder.
Advanced... Click this button to select directly from the pictures in the Image Selector dialog.
Paste Click this button in order to enter your selections as a component of the expression.

To the right in the Images tab is a pane displaying the currently selected image.

In addition, the Edit Expression dialog contains the following menu commands and buttons.

File Menu

Export to Expression File... It is possible to save the contents of the Expression edit box as a table file by means of the Export to Expressions File command. The file is saved with the extension .qve.
Insert File... A previously created expression file can be inserted into the script by means of the Insert File... command.
Colormix Wizard... A color mix expression can be created using the Colormix wizard.
Print Opens Windows standard Print dialog for printing the expressions. This command can also be invoked by the following keyboard shortcut: Ctrl+P.

Edit Menu

Undo Undoes the latest change. This command can also be invoked by the following keyboard shortcut: Ctrl+Z.
Redo Redoes the latest Undo. This command can also be invoked by the following keyboard shortcut: Ctrl+Y.
Cut Exports the highlighted text to the clipboard. This command can also be invoked by the following keyboard shortcut: Ctrl+X.
Copy Copies the highlighted text to the clipboard. This command can also be invoked by the following keyboard shortcut: Ctrl+C.
Paste Pastes the contents of the clipboard into the dialog at the position of the cursor. This command can also be invoked by the following keyboard shortcut: Ctrl+V.
Clear Clears the entire expression.
Select All Selects the entire expression.
Find/Replace... Opens a dialog where it's possible to find and replace numbers or characters in the expression. This command can also be invoked by the following keyboard shortcut: Ctrl+F.

Settings Menu

Configure... Opens User Preferences: Editor.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?