Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
praveen1108
Creator
Creator

How to Write a Date Range in Using Set Analysis

Hello All,

I have a If Statement like this:

Count(If(Type = 'XXX' and Create_Date>=Date(Today()-14) and Create_Date < Date(Today()-7),ID) )

and i would like to re-write the same using Set Analysis..How can we write it..i tried writing this way but somehow no luck.

In Data Load Editor:

LET Vtoday14=Today()-14;

LET Vtoday7=Today()-7;


In the Expression:

Count({< Type = {'XXX'},Create_Date={">=$(Vtoday14)"} ,Create_Date={"<$(Vtoday7)"}) >} ID)

Any help will be appreciated.

Regards,

PK

5 Replies
sunny_talwar

May be this

Count({<Type = {'XXX'},Create_Date={">=$(=Vtoday14)<$(=Vtoday7)"}>} ID)

praveen1108
Creator
Creator
Author

This gives me a a different result lets say X where as my If gives me Y.

sunny_talwar

What? No idea what the means?

praveen1108
Creator
Creator
Author

Hello Sunny,

The one you suggested is working but not giving me the correct result.

sunny_talwar

May be share a sample?