Qlik Community

Ask a Question

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
P_qlik
Partner
Partner

error in filter

Hi,

I need to put this formula in a filter to have date>202103

=year(addmonths(today(), -1))*100+MONTH(addmonths(today(), -1))

if I insert this formula inside evaluate value it works and gives me 202103 but if I try to put > before the formula with advance serarch to have 202103, 202104 it doens't work and gives me an error.

>=year(addmonths(today(), -1))*100+MONTH(addmonths(today(), -1))

How can I do?

Thank you

Labels (2)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Employee
Employee

Hi,

  1. create a field like Year(OrderDate)& num(Month(OrderDate),'00') as YearMonthNum in the load script, reload, save and update the connection cache
  2. create an advanced search filter with a formula like =YearMonthNum<=(year(addmonths(today(), -1))-8)*100+MONTH(addmonths(today(), -1)). As per https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Advanced_Search... I added the field YearMonthNum  

Ruggero_Piccoli_0-1618498648866.png

Results in my test:

Ruggero_Piccoli_1-1618498816915.png

 

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.

View solution in original post

2 Replies
Ruggero_Piccoli
Employee
Employee

Hi,

  1. create a field like Year(OrderDate)& num(Month(OrderDate),'00') as YearMonthNum in the load script, reload, save and update the connection cache
  2. create an advanced search filter with a formula like =YearMonthNum<=(year(addmonths(today(), -1))-8)*100+MONTH(addmonths(today(), -1)). As per https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Advanced_Search... I added the field YearMonthNum  

Ruggero_Piccoli_0-1618498648866.png

Results in my test:

Ruggero_Piccoli_1-1618498816915.png

 

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.

View solution in original post

P_qlik
Partner
Partner
Author

Thank you!