Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
leenlart
Creator
Creator

Stock data accumulating by week

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

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

Thanks for your help!!

 

Labels (1)
0 Replies