Skip to main content Skip to complementary content

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.

Writing expressions

You can type in the whole expression in the edit area for the selected expression, but it is often convenient to do most of the expression building in the tab area described below. The expression needs to start with =.

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.

Expression tab options

The Edit Expression dialog tabs contain the following options for building expressions.

Fields

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

Fields options
Option Description
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.

MEASURE fields can only be used with basic aggregation functions Sum, Avg, Count, Min, and Max.

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.

Functions options
Option Description
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 options
Option Description
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. To the right in the Images tab is a pane displaying the currently selected image.

Images options
Option Description
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.

Edit Expression menu options

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

File Menu

File Menu options
Option Description
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

Edit Menu options
Option Description
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

Settings Menu options
Option Description
Configure... Opens User Preferences: Editor.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com