Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having an issue with NPrinting appling filter.
Once a week an excel report sent by nprinting. New request is to send the last month report on the new month until the 7 of the current month
for example, on May 5th I still need to send the last month report.
So I added the new filter with the correct name field (shown on the screenshot) and try to apply the filter:
=if(day(today())<7,date(ADDMONTHS(today(),-1),'YYYY-MM'),date(today(),'YYYY-MM'))
from some reason its not working.
But if I change it to the next screenshot it will work.
why is this happening?
I read in here:
https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/
but still with no success.
Hope someone can help me with it.
Thanks
also - judging by the fact that filter is working when you put it as a "Value is:" I am assuming your field type is Text (ASCII).
That would require your formula to look like:
=text(date(if(day(today())<7,ADDMONTHS(today(),-1),today()),'YYYY-MM'))
Hi,
Have you tried without equal sign ?
Please make sure that you understand what each of the functions you are using in your formula is doing and how field used in filter was created in load script .
Start with understanding how your YYYY-MM field is created in Qlik and to give you correct answer and be 100% sure that it will work we need to see Qlik script creating this field.
it can be something like:
Date(MonthStart(SomeDate),'YYYY-MM') as someYYYYMMfield
If it is a date (just like shown above) it holds under this mask actual value of the monthstart which is a timestamp.
Read those articles about pitfalls of NPrinting filters again. I explained them with examples:
https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals/
Note, that the most important thing is to:
If you come back to us with answer how your field is created we may be able to help you more...
cheers
also - judging by the fact that filter is working when you put it as a "Value is:" I am assuming your field type is Text (ASCII).
That would require your formula to look like:
=text(date(if(day(today())<7,ADDMONTHS(today(),-1),today()),'YYYY-MM'))
Thank you, it applied good when wrapping it in a text() function.
It means that your field you tried to filter is not a proper date field but text field