Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
anwarbham
Contributor III
Contributor III

NPrinting if statement Dynamic Filter

Hi 

I am trying to create a dynamic filter in NPrinting for Qlik Sense using the below expression , to get the current Cycle Date.

 

=if( Today() >= [Cycle Start Date]  and  Today()  <= [Cycle End Date] , Cycle)

 

 the expression works on the Qlik Dashboard

image.png

 

 

 

 

but in Qlik I get the error 

image.png

I don't understand I'm following the Qlik method on filters

image.png

will I have to create a variable in Qlik and use the variable instead of the If Statement ? 

Labels (2)
1 Solution

Accepted Solutions
anwarbham
Contributor III
Contributor III
Author

I manage to get a workaround Thanks Qlik 🙄

I had to create an extra Column via the Script that generates a flag 

= if( (Month(Today())-1) >= Month([Cycle Start Date]) and (Month(Today())-1) <= Month([Cycle End Date]) , 0, if (Year(today()) = Year([Cycle Start Date]) , 1,0)) as PreviousCycle

 

and use this flag in NPrinting .

another app bug to the list 

 

 

View solution in original post

2 Replies
anwarbham
Contributor III
Contributor III
Author

I have tried putting the expression in a  Variable ,  and using the variable in the Evaluate filter box same issue.

 

anwarbham
Contributor III
Contributor III
Author

I manage to get a workaround Thanks Qlik 🙄

I had to create an extra Column via the Script that generates a flag 

= if( (Month(Today())-1) >= Month([Cycle Start Date]) and (Month(Today())-1) <= Month([Cycle End Date]) , 0, if (Year(today()) = Year([Cycle Start Date]) , 1,0)) as PreviousCycle

 

and use this flag in NPrinting .

another app bug to the list