Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Creator III
Creator III

InDay

Hi experts

I need some help. We have a dataset with orders and an opening date of those orders. Now we need to determine the orders which were opened today, orders which are opened in the next 5 days ahead of today and orders which have been opened 365 days from today in the past. 

How would you solve this? I started with the script below.

Many thanks, Tom

 

InDay([Date], today(), 5) as [next 5 days],

InDay([Date], today(), 0) as [Today],

InDay([Date], today(), -365) as [Past],

1 Solution

Accepted Solutions
rubenmarin

hi, I think InDay() wil compare with an specific day, not a range, it could work for [Today], for the other two you can check with if, like:

If([Date]>=Today() and Date<=Today()+5,1,0) as [next 5 days]

If([Date]>=Today()-365 and Date<=Today(),1,0) as [Past]

View solution in original post

1 Reply
rubenmarin

hi, I think InDay() wil compare with an specific day, not a range, it could work for [Today], for the other two you can check with if, like:

If([Date]>=Today() and Date<=Today()+5,1,0) as [next 5 days]

If([Date]>=Today()-365 and Date<=Today(),1,0) as [Past]