Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum last year until current calendarweek

Hi experts

I would like to compare the following values in a table:

These are my formulas:

1. Sum of my sales of the current year:

Sum ({<Year={$(VmaxYear)}>} ([Sales]))

1. Sum of my sales of the last year:

Sum ({<Year={$(VPrevYear)}>} ([Sales]))

BUT for last year only until the current week.

How would I have to script this? I was thinking about defining a variable that is then inserted into the "Sum ({<Year={$(VPrevYear)}>} ([Sales]))" command.

Thank you for your help!

Jan

2 Replies
Gysbert_Wassenaar

Perhaps this: Sum ({<Jahr={$(VVorjahr)}, Woche={'<=$(=max({<Jahr={$(VmaxJahr)}>}Woche)'}))>} ([Sales]))


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert

Thank you. Looks good. But does not work yet...

Best

Jan