Announcements
cancel
Showing results for
Did you mean:
Contributor II

## Set Analysis - Date Range (defined by variables)

Hello All,

I have searched around the forums here and tried various versions of solutions to this issue but none seem to work for me.

I am trying to set up set analyses that will show me sales this week, last week,the week before that...etc

From these I will create run rates and various other things.

My issue is that when I drop in my test variables   (These are names purely for testing btw)
"v1WeeK"   Defined as =Date(Max(invoice_date)-7)    (In a text box, this is displaying the correct date)

"vMaxDate"  Defined as =Date(Max(invoice_date))  (In a text box, this is displaying the correct date)

Into the following expression :

=sum ( { <invoice_date = {'>= \$(=v1Week)<=\$(vMaxDate)'} >} Qty )

I am getting the same result as "=Sum(Qty)"

Any ideas at all ?

I've got fistfuls of hair all around my desk...

Thanks
Tony

1 Solution

Accepted Solutions
MVP

Try some variations of your expression

1)

`=Sum({<invoice_date = {">=\$(=\$(v1Week))<=\$(=\$(vMaxDate))"}>} Qty)`

or

`=Sum({<invoice_date = {">=\$(=v1Week)<=\$(=vMaxDate)"}>} Qty)`
2 Replies
MVP

Try some variations of your expression

1)

`=Sum({<invoice_date = {">=\$(=\$(v1Week))<=\$(=\$(vMaxDate))"}>} Qty)`

or

`=Sum({<invoice_date = {">=\$(=v1Week)<=\$(=vMaxDate)"}>} Qty)`
Contributor II
Author

...My Hero Sunny!

The second option works a treat!

Thank you so much!

T

Community Browser