Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to add a date range filter to a chart in an excel report.
I have two Date Fields
The chart will always need to filter on the last 12 full months. Is it possible to add an expression in the NPRINT filter values so the chart is filtered on the last 12 months ? For example, if the report was run today - the data would cover 01-Aug-22 to 31-July-23?
Many thanks,
Dai
Hi,
Qlik NPrinting filters can use Qlik expressions and advanced search: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...
The expressions and advanced search used the QlikView and Qlik Sense syntax and will be sent to the server that will evaluate them and return the results.
Plus similar questions were already asked in the community like in the post https://community.qlik.com/t5/Qlik-NPrinting/Filter-based-on-date/td-p/1859048. So I suggest you to do a search to find the one with better suggestions for your case.
Best Regards,
Ruggero
Hi @Ruggero_Piccoli thanks so much for your reply
I can get
Evaluate Value : =MonthStart(Today(),-2) to work
But I cannot get
Evaluate Value : >=MonthStart(Today(),-2) to work
Id be very grateful if you could advise please..
Many thanks,
Dai
Hi @Senor_Dai
@Ruggero_Piccoli already mentioned that you need to use advanced search and provided you with links - have you studied them thoroughly and do you understand all what is said in them?
I have explained that before and documentation states that (value is, numerical value is and evaluate value filter options can only filter single value which is why you cannot use ">=" as that would return multiple values. For >= you can only use Advanced search option, so again if you want to use range - you will need to use advanced search option. This however may be tricky if you are already using other filters as advanced search filter operates only within possible selection state, meaning that result of advanced search can only be applied within "possible" selection state based on other filters. Do you have other filters? Can other filters interact with advanced search filter in your case?
If that is the case I suggest you create a flag in your calendar for all dates meeting last 12 months criteria as it would be much simpler and apply filter on the flag.
If you dont want to do that you can still use Evaluate value (12 entries in total for each month separately). I put as sample on below picture 3 entries, you would need to have all 12 (1 for each month)
I have described about all sorts of filters option on my blog here and I encourage you to read it to learn about it:
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/
cheers
Lech