Calculate fields processor
Adds new fields based on Qlik script expressions.
The Calculate fields processor allows you to create new fields in the schema of your data, and fill each of them using Qlik script expressions. Your script can use everything from the input schema, allowing you to use combinations or transformed versions of existing fields.
Usage
-
The Calculate fields processor requires one input flow and can generate only one output flow.
-
Click the + icon in the processor configuration panel to create more than one calculated field.
Properties
Properties to configure to calculate new fields.
Property | Configuration |
---|---|
Name | Give a custom name to the newly created field. |
Expression | Enter your Qlik script expression in the text editor to set the values of the new field. For more information on the Qlik script syntax, see Script syntax and chart functions. |
To rename the processor or edit its description, click the Edit icon next to the processor name in the Properties panel.
Examples
-
Using if/then/else conditions. In this example, you have loaded data with temperature, and want to include additional information depending on the values:
Table_with_temperatures: LOAD*, If(Temperature <= 0 , 'Freezing', If(Temperature >= 100, 'Boiling', If(Temperature >0 AND Temperature < 100, 'Between'))) As Description;
For more information, see If..then..elseif..else..end if.