Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
bruce_sorge
Contributor III
Contributor III

Show only dates 120 days out from today

Greetings folks,

I have a table (vizlib) where one of the columns need to show only records 120 days from today. I have Googled this for a couple days now and I found two scripts that kind of work in my set expression:

if([Agency Deadline]>=today() or [Agency Deadline]<=today()+120,[Agency Deadline])

( {<[Agency Deadline]={">=$(=Date((Max(Date)+120)))"}>} [Agency Deadline] )

 The problem is I am still getting dates greater than 120 days. My date field is a timestamp if that helps. I am converting it from a timestamp to a date field in the Load script:

Date([Baseline Due Date],'MM/DD/YYYY') AS [Agency Deadline]

 

Thanks in advance.

Labels (4)
1 Solution

Accepted Solutions
bruce_sorge
Contributor III
Contributor III
Author

Thanks for the answer but that didn't work. Exactly same result. I ended up ditching the vizlib table and went with a native qlik table and entered this expression into the expression editor for the date column and it worked. 

=If(Date([Agency Deadline],'MM/DD/YYYY') <= AddMonths(Today(), 3), [Agency Deadline])

 

And that is working fine. 

View solution in original post

2 Replies
Frank_S
Support
Support

Try using a Qlik Native table object to check if it produces the expect results or the same unexpected results.

Also check if there are any always one selected values in your data fields that might be skewing the results incorrectly.

Kind regards.,,

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
bruce_sorge
Contributor III
Contributor III
Author

Thanks for the answer but that didn't work. Exactly same result. I ended up ditching the vizlib table and went with a native qlik table and entered this expression into the expression editor for the date column and it worked. 

=If(Date([Agency Deadline],'MM/DD/YYYY') <= AddMonths(Today(), 3), [Agency Deadline])

 

And that is working fine.