Qlik Community

Qlik NPrinting Documents

Documents related to Qlik NPrinting.

QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Now

How to Create Static and Dynamic Filters Based on Fields

Not applicable

How to Create Static and Dynamic Filters Based on Fields

In NPrinting you can create:

Filters based on fields can use both existing field values and also values which do not currently exist in the data (this may be useful for slowly changing fields).

Dynamic filters use QlikView syntax expressions which are calculated at run time and then applied to the filter field. You can only use expressions whose output is a single value (e.g. "year(now())").

To create a search expression that involves search criteria for associated fields and full boolean logic you can use QlikView Advanced Search that is supported by NPrinting and explained in the tutorial "How to Use QlikView Advanced Search with NPrinting Filters".

The use of QlikView Bookmarks is still supported (see: Creating NPrinting Filters Based on Existing QlikView Bookmarks) but we suggest the use of the Advanced Search feature when you need to create complex dynamic filters.

NPrinting allows users to associate filters with Tasks, Recipients and Reports. It is also possible to apply one specific filter to a table or an image inside a report (refer to How to Apply a Specific Filter to Tables or Images).

Filters are applied in a specific order: Task filters are applied first, then Recipient filters, and finally Report filters. This may have an impact on which values are in the final data set created for any given report. NPrinting filters are applied in the same way and with the same logic as filters applied by a QlikView user using the QlikView desktop application.


Create New Filter

  1. Click on Filters in the lower left pane
  2. Click on Filter in the New group in the ribbon

This opens the Filters window


Configure Filter

  1. Give the filter a Name
  2. Optionally enter a Description
  3. Click on the Add button in the Fields group to add one or more fields to your filter

Open Select Field Window


Click on the browse button at the extreme right end of the Name field.


Select Field(s) You Want to Use in Your Filter

  1. Select the Connection to the QlikView document that contains the fields you want. The Select Field window lists all available QlikView documents and the fields they contain
  2. Scroll down to and select the Year field
  3. Click on the OK button to add the field

Select Existing Field Values to Add to Filter

  1. Click on the Add Values button in the Field window, which opens the Select Values window listing all the values for that field present in the QlikView document
  2. You can select one or more values (use Shift or Ctrl + Click)
  3. Click on the OK button at the bottom of the Select Values window

Add New Value


You can add values to the filter manually for values not present in the QlikView file.

  1. Click on the green '+' button to add a new row below the existing values in your filter
  2. Click on the cell in the new row in the Value column and enter any year value. Any data related to that value will be included in the report if and when that data becomes available in the QlikView document
  3. Click on the corresponding box in the IsNumeric column so that it is checked
  4. Enter the numeric value corresponding to the string of numeric characters that has been entered in the Value column

Delete Values


You can delete rows with values you do not want

  1. Select the row(s) you want to delete
  2. Click on the red '-' button
  3. Click on OK in the Confirm dialog to delete the selected rows
  4. Conclude by clicking on OK in the Field dialog window

Add an Expression in QlikView Syntax


You can create filters based on expressions in QlikView syntax. The limitation is that any expression to be passed by NPrinting to QlikView for evaluation must return a unique value compatible with the selected field. For instance, "year(now())" returns a unique integer value compatible with the field Year. "Year>2010" returns a unique value, however, it is boolean (true or false) which is therefore not compatible with the Year field which is an integer. Also ">year(now())" and "2014>year(now())" are incorrect.

NPrinting also supports QlikView Advanced Search. Refer to "How to Use QlikView Advanced Search with NPrinting Filters".

  1. Click the green "+" to create a new row
  2. Click on the cell in the Value column and type in the QlikView syntax expression you want to use
  3. Select the IsNumeric check box so that the expression is used for comparison as a number and not as a string
  4. Select the Evaluate check box so that NPrinting forwards the expression to QlikView for evaluation

QlikView advanced search is supported by NPrinting filters. Refer to "How to Use QlikView Advanced Search with NPrinting Filters"


Set Filter Parameters


There are five filter parameters in NPrinting field filters. You can set one or many of these parameters when you create your filter. Parameters are applied in the order that filters are applied (first Task filters, then Recipient filters and finally Report filters).

1.      Locked: this will lock this field; if there are other filters based on this field in NPrinting, they will not be applied.

2.      Verify filter: this will do two things:

         a) If a filter with Verify filter is applied and the resulting data set is empty, then NPrinting will not generate a report. This can be used to do conditional reporting.

         b) If a filter without Verify filter is applied, NPrinting try to select values that not exist in the .qvw. In this case QlikView enables all values so NPrinting will generate a report with the unfiltered dataset. For instance, if you filter for France and 2013 but there were no sales in France in 2013, NPrinting will create a report with sales on all other countries.

3.     Select Excluded: If you select this check box, you will filter for all of the values of the field that you DID NOT select (e.g. you filter Male for Gender and use the Select Excluded parameter, then the report will be filtered for Female)

4.    Drop Field (in reduce): If you select this check box, when you run a reduce Task, the resulting QlikView QVW will not contain that field

5.    Unlocked if Locked: this will unlock fields that are locked in Qlikview


Save Field, Values and Parameter Settings


Click on OK to save the field, values and parameters settings


Save Filter


Click on Save and Close to save and close the filter

Version history
Revision #:
1 of 1
Last update:
‎2015-04-23 04:04 AM
Updated by: