### RE: is it possible to create a saved search which show count of orders in different number of days

Answered

is it possible to create a saved search which show count of orders in different number of days e.g total orders in 30 days, total orders in 90 days etc 1 Answers
Best answer

Yes!,

Can be accomplished with formulas (Use sum on the formulas and group per customer)

For the “last 30, 90 etc” use:

case when {trandate} >= ({today}-X) then 1 else 0 end  (Wrap in Sum)

Where X is your Amount of days.

For the MTD, YTD You can Use the Extract function.

Formula examples:

case when EXTRACT(Year from {trandate}) = EXTRACT(Year from {today}) then 1 else 0 end // THIS YEAR

case when EXTRACT(Year from {trandate}) = (EXTRACT(Year from {today})-1) then 1 else 0 end // LAST YEAR

Maybe someone has a simpler solution, this should work though perfect . Thanks alot

on April 27, 2020.
Add Comment

### Your Answer

By posting your answer, you agree to the privacy policy and terms of service.