Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

jblomqvist
Contributor II

How to make a dynamic Filter for a field in NPrinting 16? E.g. Select Year and Month based on an expression

Hello all,

I would like to make a dynamic selection in a filter that applies to the whole report.

The dynamic filter will be on my Year and Month field where an expression will calculate to select the current Year and last month from the current month.

I already have the expression for the two.

How do I enter this for a dynamic filter for the two fields?

3 Replies
Employee
Employee

Re: How to make a dynamic Filter for a field in NPrinting 16? E.g. Select Year and Month based on an expression

lech_miszkiewic
Honored Contributor III

Re: How to make a dynamic Filter for a field in NPrinting 16? E.g. Select Year and Month based on an expression

Looks like 1st result in google query will give you an answer

How to Create Static and Dynamic Filters Based on Fields

NP.png

lech_miszkiewic
Honored Contributor III

Re: How to make a dynamic Filter for a field in NPrinting 16? E.g. Select Year and Month based on an expression

Just to add to it

Having 2 fields and applying selections on both does not make sense as:

  • current year = say 2017
  • current month = say Jan
    • so last month will be Dec
    • so your filter would be Dec-2017 which is wrong i guess??

I would simplify this task by creating one date field for each month:

  • MonthStart("YourDate") as A_field

Then your filter on A_field would require only one expression and it would be:

  • =MonthStart(AddMonths(Today(),-1))

hope this helps

cheers

Lech

Community Browser