Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a question related to NPrinting filters.
Within my application I have a filter for the current Fiscal Year.
The fiscal year is starting at the 01.10. and it ends at the 30.09.
The calculated Year value for the current fiscal year is 2016.
My question is, is there a possibility to calculate the fiscal year within NPrinting depending from the e.g. month number?
For example if (vCurMonth >= 10, FiscalYear(today(0)), FiscalYear(AddYears(today(0), - 1));
The variable vCurMonth is also calculated in the script.
Many thanks in advance and best regards,
Claus
Hi Claus,
it is possible.
This works in version 16.
If you have filter for FiscalYear put the formula (needs to have = ) into Value and deselect IsNumeric and select Evaluate
=If(Month(Today())>=10, Year(Today()), Year(AddYears(Today(), -1)))
This way the formula will be evaluated and the result will be inserted into FiscalYear.
In nprinting 17 it is very similar.
BR,
Matus
Hi Claus,
it is possible.
This works in version 16.
If you have filter for FiscalYear put the formula (needs to have = ) into Value and deselect IsNumeric and select Evaluate
=If(Month(Today())>=10, Year(Today()), Year(AddYears(Today(), -1)))
This way the formula will be evaluated and the result will be inserted into FiscalYear.
In nprinting 17 it is very similar.
BR,
Matus
Hi Matus,
many thanks! Your solution works perfect!
I'm currently thinking about an update to NPrinting 17. Is there a release note which describes the differences?
Best regards,
Claus
Be aware that 17 is not a direct upgrade so not all functionality that is in 16 is already ported.
I think one that is still missing is variable filter - but I cannot find it in any release notes.
Also from what I saw you can not import from your nsq files from 16 so you will have to recreate all the filters, tasks, etc. Only the templates can be imported.
Matus
Ok, many thanks! Considering this points I will think about the upgrade to 17.
BR,
Claus
Hi Matus,
Variable filters are still not possible in 17.2.2. Refer to the table at the bottom of this page: https://help.qlik.com/en-US/nprinting/17.2/Content/Introduction/Introduction.htm
Also, your suggested formula will not work in version 17.x. Formulae must return single values only - Month(Today())=10 is fine, Month(Today())>=10 is not.
HTH - Daniel.
Hi Daniel,
thanks for the link. Is there some roadmap for the missing functionality?
The >= is only in the if condition part. The formula returns single year. So it should be fine.
What I meant by similar is the IsNumeric and Evaluate flags setting. In 16 the IsNumeric needs to be deselected otherwise it does not work; in 17 there is no IsNumeric flag.
Matus
Hi Matus,
Of course you are right.
To clarify, in version 17.x you need to select Evaluate value from the value type dropdown. You can also use variables in your formula in answer to the original enquiry by Claus. Example:
HTH - Daniel.
if i have a variables range for start and end date , how can i make it here in Nprinting 17.2
Posting_Date={'>=$(=Date(vFrmDate_Fmt))<=$(=Date(vToDate_Fmt))
if i have a variables range for start and end date , how can i make it here in Nprinting 17.2
Posting_Date={'>=$(=Date(vFrmDate_Fmt))<=$(=Date(vToDate_Fmt))