Skip to main content Skip to complementary content

Qlik Sense and QlikView formulas

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 Excel, PowerPoint, Word, HTML and PixelPerfect reports. They can be formatted the same as plain text.

You can insert formulas in levels. The formula will be evaluated for each level.

Formula evaluation

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.

Requirements

Information noteFormulas used in Qlik NPrinting must evaluate to a unique value.

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:

  1. Open an existing report, or create a new one.
  2. Right-click the Formulas node, and then select Add formula.
  3. Enter a name in the window that opens.
  4. Enter your formula. For example: NumericCount (OrderID).

    The calculated result is visible in the bottom part of the Edit Formula window.

  5. Click OK.

    You can add additional formulas if desired.

  6. Drag the formula node tokens onto empty cells or areas of the template.

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!