Hello,
I am migrating an old Qlikview app to Qlik Sense, and I've come across a table that makes me think we can do this much simpler...
The table shows the stock in kilograms by type of product and by week. There is a first expression (E1) that returns the situation for the end of December. The next expression (E2) is E1 + the movements of stock for week 1. The next expression (E3) is E1+E2 + the movements of stock for week 2 .... all they defined expressions for all the weeks to 52.
![leenlart_0-1664290648437.png leenlart_0-1664290648437.png](https://community.qlik.com/t5/image/serverpage/image-id/90032i8B2FB96A2E94E803/image-dimensions/607x149?v=v2)
Seriously.
Now, I'd like to think I'm a bit more sly (and especially lazier) than this. However, I can't seem to get my expression to work!
My idea is to put the Week field in the columns. And use an expression that will add up my December situations plus all the movements until the week in the current column.
sum( {$<ANNEE={$(=Only(ANNEE)-1)}, MOIS={'déc.'}, SEMAINE= , JOUR= >} QTEBASE1_SIT))
+ ( Sum({$<SENS_MVT={'E'}, MOIS = , JOUR = , SEMAINE={"<=SEMAINE"} >} QTEBASE1_MVT)- Sum({$<SENS_MVT={'S'}, MOIS = , JOUR = , SEMAINE={"<=SEMAINE"} >} QTEBASE1_MVT))
How do I tell my set analysis to take all the weeks up to and including the week in the current column ?
![leenlart_1-1664290915777.png leenlart_1-1664290915777.png](https://community.qlik.com/t5/image/serverpage/image-id/90033i5F7E78960C7E172A/image-dimensions/695x216?v=v2)
Thanks for your help!!