Hi guys,
if I have a table like this :
Customer | Month | Amount |
cust1 | ene | 1 |
cust1 | feb | 1 |
cust1 | mar | 1 |
cust2 | ene | 1 |
cust2 | feb | 1 |
cust2 | mar | 1 |
cust3 | ene | 1 |
cust3 | feb | 1 |
cust3 | mar | 1 |
I'd like to have a simple table with two expressions :
1- Total amount of sales.
2-YearToDate of amount of sales.
I've been trying to do it with a yeartodate set analysis I've found on the forum :
Year to Date = Sum({<Datefield={'>=$(=(Num(YearStart(Max(Datefield)))))<=$(=(Num(Datefield)))'}>}Sales)
And it works fine if no month is selected. But If I select, for example, february, I get this :
Customer | Feb | yearToDate |
cust1 | 1 | 1 |
cust2 | 1 | 1 |
cust3 | 1 | 1 |
When the correct table is :
Customer | Feb | yearToDate |
cust1 | 1 | 2 |
cust2 | 1 | 2 |
cust3 | 1 | 2 |
Any idea about how to solve that? I'm trying to avoid "alternate states". I hope it won't be necessary.
Many thanks in advance.
Regards, Marcel.