Qlik Community

Ask a Question

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
P_qlik
Partner
Partner

date filter gives error

Hi,

I have a problem with a formula in nprinting filter:

I have a date  in date format (not timestamp) like this: 1/1/2021, 1/2/2021..f I try to do some formulas like this one it works:

Immagine.png

If I try this formula it gives me an error:

Immagine.png

Immagine2.png

How can I do? I can't change the script in qlik sense, I need to do all in qlik nprinting.

Thank you

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz

by the way 

to start with something like this should work in NPrinting:

=([data]<Today())

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.

View solution in original post

8 Replies
Andrea_Bertazzo
Support
Support

Hi Giada,

you may try with Date(today()) or by specifying the formatting Date(Today, 'D/M/YYYY').

P_qlik
Partner
Partner
Author

Ciao @Andrea_Bertazzo , grazie per la risposta,

ho provato con quello che mi hai suggerito, ho anche provato con Date(Today, 'DD/MM/YYYY')  ma mi continua a dare lo stesso errore

Lech_Miszkiewicz

Few considerations:

First and most important is how is your date field created in Qlik Sense? Are you using something like: 

Date(Floor([some date])) as data

in your script?

Or what is is it? It is important as it will indicate how we can filter this field.

I described troubles like this in below articles:

https://nprintingadventures.com/2019/06/26/nprinting-filters-part-3-advanced-search/

https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/

Make sure you read them carefully as i guess they will help you solve this issue.

cheers

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.
P_qlik
Partner
Partner
Author

@Lech_Miszkiewicz , thank you for your reply, the script is autogenerated and it's te following:

Immagine.png

Do you have any suggestion?

Thank you

Ruggero_Piccoli
Employee
Employee

Hi,

Qlik NPrinting was born in Italy so there are many italian speakers here, but please write you messages in English so every reader can understand them. Thanks for your cooperation. 

I suggest you to follow the @Lech_Miszkiewicz link https://nprintingadventures.com/2019/06/26/nprinting-filters-part-3-advanced-search/ and start by writing a filter that works on the Qlik Sense app. After finding it copy the formula in the Qlik NPrinting filter because Qlik NPrinting send the formula to Qlik Sense that will evaluate it. So the formula you use must work on Qlik Sense.

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.
Lech_Miszkiewicz

Ok - this becomes even more complicated as autocalendar fields do not exist as phisical fields when used with NPrinting  and I would NEVER recommend using such calendar in any app used with NPrinting. This in my opinion is just not good practice at all. Instead I would suggest to create a dedicated calendar fields using standard good practices!

Down to your answer - It is not consistent.

What you are actually saing is not 100% right. Field called "data" is not created in your autoCalendar... your autoCalendar is derived from this field which is completely different thing.

again I would suggest to make sure that type of this field is set in stone by applying methods I mentioned above and then you can filter it according to your needs as per my blog posts...

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.
Lech_Miszkiewicz

by the way 

to start with something like this should work in NPrinting:

=([data]<Today())

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.

View solution in original post

Lech_Miszkiewicz

also last more thing... If by any chance you have to reference your autoCalendar periods here is the solution on how to implement it with NPrinting:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-Filter-on-Date-that-uses-auto-Cal...

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.