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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

Limiting Date

Hello , I need to limit date in load script of two dimensions  [Available From Date] and  [Available To Date].  I need

[Available From Date]  to begin from current date AND 

[Available To Date] to end two years from current date. 

 

Below is my code which is not working. Can anyone tell me how to fix this? Thanks

IF([Available From Date] >='$(=Year(Today()))' ,[ Available From Date]) as [Current Availability],

IF([Available To Date] <='$(=Year(Today())+2' ,[ Available From Date]) as [End Availability],

1 Reply
MayilVahanan
MVP
MVP

Hi Pomna,

Try like below

IF(Year([Available From Date]) >= Year(Today()) ,[ Available From Date]) as [Current Availability],

IF(Year([Available To Date]) <=Year(Today())+2 , [ Available From Date]) as [End Availability],

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.