Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

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]