Announcements
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Last Quarter

Hi all,

I'm trying to count how many units were sold last quarter. For this quarter I can do the below and it gives the correct figures.

sum({<UNIT.SOLD_DATE = {">=\$(=date(quarterstart(today())))  <=\$(=date(quarterend(today())))"}, >} UNIT.TOTALSOLD)

In my head I should be able to do the following,

sum({<UNIT.SOLD_DATE = {">=\$(=date(quarterstart(today())))-1  <=\$(=date(quarterend(today())))-1"}, >} UNIT.TOTALSOLD)

But this doesn't work, has anyone got any ideas as it seems quite simple?

Thanks

Gareth

1 Solution

Accepted Solutions
MVP

Hi

Try like this

sum({<UNIT.SOLD_DATE = {">=\$(=date(quarterstart(today(),-1)))  <=\$(=date(quarterend(today(),-1)))"}, >} UNIT.TOTALSOLD)

Thanks & Regards, Mayil Vahanan R
4 Replies
MVP

Hi

Try like this

sum({<UNIT.SOLD_DATE = {">=\$(=date(quarterstart(today(),-1)))  <=\$(=date(quarterend(today(),-1)))"}, >} UNIT.TOTALSOLD)

Thanks & Regards, Mayil Vahanan R
MVP

Try like:

sum({<UNIT.SOLD_DATE = {">=\$(=date(quarterstart(today(),-1)))  <=\$(=date(quarterend(today(),-1)))"}, >} UNIT.TOTALSOLD)

Anonymous
Not applicable
Author

Amazing! Thank you Mayil!!!

Anonymous
Not applicable
Author

Remove Comma in last, try this:

sum({<UNIT.SOLD_DATE = {'>=\$(=date(quarterstart(today())))-1  <=\$(=date(quarterend(today())))-1'} >} UNIT.TOTALSOLD)

Also make sure UNIT.SOLD_DATE, have same format as Today(), if format of both the date mismatch, it wud not give you anything

Community Browser