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: 
wanass123
Contributor III
Contributor III

select last 3 days in the past .

select yesterday I used below code :  

if(Problem_Resolution_Date=date(today()-1),'Yes','No') as resulutionYestarday,

 

select day before 4 days ago I just change -1 with -4 

if(Problem_Resolution_Date=date(today()-4),'Yes','No') as resolvedlast4Days,

 

how to select last 3 days ( -1 , -2 , -3 ) or last 4 ( -1 , -2 ,-3 , -4 )  days .. ?

because above code give data for one day only, but what  I need is to select  a range 

please advice . 

 

 

Labels (6)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

SET vDateFlag = Date(Today() - 3);


IF(Date(DateField) >= $(vDateFlag), 'yes', 'no')

 

or in set analysis


Sum({< DateField = {'>=$(vDateFlag)'} >} Sales)

View solution in original post

1 Reply
Chanty4u
MVP
MVP

SET vDateFlag = Date(Today() - 3);


IF(Date(DateField) >= $(vDateFlag), 'yes', 'no')

 

or in set analysis


Sum({< DateField = {'>=$(vDateFlag)'} >} Sales)