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: 
Senor_Dai
Partner - Creator II
Partner - Creator II

FIlters and Expressions

Hello,

 

I need to add a date range filter to a chart in an excel report.

 

I have two Date Fields 

  1. Date From
  2. Date To

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

Labels (1)
3 Replies
Ruggero_Piccoli
Support
Support

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

 



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.
Senor_Dai
Partner - Creator II
Partner - Creator II
Author

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

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

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)

Lech_Miszkiewicz_0-1692774149631.png

 

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/2022/03/19/filters-in-nprinting-how-hard-can-it-be-part-3-evaluate-v...

https://nprintingadventures.com/2019/02/25/the-pitfalls-of-nprinting-filters-part-2-search-string-fi...

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

cheers

Lech

 

 

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.