Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
adimiz123
Creator
Creator

Evaluate value filter for Today()-1 in NP printing not work properly

Hi, 

It's seems that something wort wrong. 
I have set a filter as - Evaluate value --> Today()-1

But If QS model doesn't run one day I get report of 2 days before  

Example-  

for 11/07/2022 I want to get report of  10/07/2022, If QS model failed I get report of - 09/07/2022 
And it's mistake. 

What wrong with my definition  ? 
thanks 

 

 

Labels (2)
1 Solution

Accepted Solutions
Jacob_Poole
Contributor III
Contributor III

Hope this will help.

For the first question, 

I have set a filter as - Evaluate value --> Today()-1  But If QS model doesn't run one day I get report of 2 days before 

Maybe try changing the expression to Today(1)-1.

This will help explain how the timer in the Today() function can impact results.

https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunc...

 

Example-  for 11/07/2022 I want to get report of  10/07/2022, If QS model failed I get report of - 09/07/2022 
This sounds like you're looking for prior months not previous day,  you may need to use some other function possibly addmonths().

https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunc...

 

As Ruggero suggested test it on the QS side to see if it evaluates as intended. 

 

View solution in original post

6 Replies
Ruggero_Piccoli
Support
Support

Hi,

Qlik NPrinting doesn't evaluate filter formulas, it send them to Qlik Sense that evaluates and returns the result. So I suggest you to check on the Qlik Sense side it everything works correctly.

Another idea could be to insert that formula in the template so you can check the result in the generated report. 

Best Regards,

Ruggero 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Jacob_Poole
Contributor III
Contributor III

Hope this will help.

For the first question, 

I have set a filter as - Evaluate value --> Today()-1  But If QS model doesn't run one day I get report of 2 days before 

Maybe try changing the expression to Today(1)-1.

This will help explain how the timer in the Today() function can impact results.

https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunc...

 

Example-  for 11/07/2022 I want to get report of  10/07/2022, If QS model failed I get report of - 09/07/2022 
This sounds like you're looking for prior months not previous day,  you may need to use some other function possibly addmonths().

https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTimeFunc...

 

As Ruggero suggested test it on the QS side to see if it evaluates as intended. 

 

adimiz123
Creator
Creator
Author

what is the best way to define filter for -->  Date = Today()-1 ? 

Jacob_Poole
Contributor III
Contributor III

It depends on your data model, the date you're evaluating against, and the intended results. Check out the link in the response below for an overview of the Today function.  

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @adimiz123 

both answers above are correct and tell you everything you need to know. @Jacob_Poole gave you a clue on the Today() function parameter which may be in play in this scenario and @Ruggero_Piccoli suggested how to quickly test it (by putting expression directly in Qlik Sense expression in any of the objects which allows for expressions).

I am not sure what else is not clear? Please give us a hint which part you are struggle with.

btw - the formula you are using is normally correct, so maybe just add "1" to the Today(1) function and it may be all good. 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
adimiz123
Creator
Creator
Author

Thanks
I will try and update.  

This sounds like you're looking for prior months not previous day,  you may need to use some other function possibly addmonths().  

I meant to yesterday. (we use date at this form -  'DD/MM/YYYY' )