You can create QlikView and Qlik Sense formulas and add them to reports in Qlik NPrinting. Formulas must follow QlikView or Qlik Sense formula rules and syntax.
Formulas can be added to
You can insert formulas in levels. The formula will be evaluated for each level.
Formulas are applied with and without numerical and time formatting. Qlik NPrinting sends the formula to QlikView or Qlik Sense for evaluation. Any numerical or time formatting must be applied by QlikView or Qlik Sense at the moment the formula is evaluated to its unique value. The value is exported from with whatever numerical or time formatting has been applied, and will not be altered by any attempt to apply similar formatting in the template.
Note that =getCurrentSelections() returns a unique string. It is composed by merging the selected values with a separator, but the function is allowed because this is a single string.
You cannot add an Aggr() formula, for example Aggr(Count(DISTINCT CustomerID), Salesman), because it returns multiple values. You can resolve this by concatenating the result of the Aggr(), for example concat(Aggr(Count(DISTINCT CustomerID), Salesman), ' - ').
Adding a formula
Do the following:
- Open an existing report, or create a new one.
- Right-click the Formulas node, and then select Add formula.
- Enter a name in the window that opens.
Enter your formula. For example: NumericCount (OrderID).
The calculated result is visible in the bottom part of the Edit Formula window.
You can add additional formulas if desired.
- Drag the formula node tokens onto empty cells or areas of the template.