how to get sales from the last 3 months based on current date in smartlist builder
how to get sales from the last 3 months based on current date in smartlist builder
Answers
Best Answer
You would create a calculated field that determines if the sales date is within the last 3 months and then use a restriction to return only the records that are returned as “yes”. I have included a calculation sample below.
CASE
WHEN {YourTable:YourField} >= convert(date,(DATEADD ( m , -3, GETDATE() ))) THEN ‘yes’
ELSE ‘no’
END
CASE
WHEN {YourTable:YourField} >= convert(date,(DATEADD ( m , -3, GETDATE() ))) THEN ‘yes’
ELSE ‘no’
END