Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Tags (1)
2 Replies

Re: Sum last year until current Kalenderweek

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


talk is cheap, supply exceeds demand
Not applicable

Re: Sum last year until current calendarweek

Hi Gysbert

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

Best

Jan

Community Browser