Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alexandernatale
Creator II
Creator II

Weekly incremental with total data

hi to all the experts of the forum

 

I have a problem that, however trivial, I cannot solve.

I have a table made as in the figure.

 

Sum (TIR) indicates the daily value of the inventory. That is how many pieces there are daily. I would like to calculate the WEEKLY variation and report it on a graph. Come can I do?

image.png

  

Labels (1)
  • SaaS

7 Replies
Vegar
MVP
MVP

Please explain "weekly variation" ? Maybe you could post how the expected output would look like using your sample in the posted image? 

alexandernatale
Creator II
Creator II
Author

Hello @Vegar and thanks for reply!

Schermata 2020-10-19 alle 18.58.28.png

I would like to see the weekly increase. In a graph for example, as if the time scale were the week and it showed me the increase / decrease

 

I hope I was clear

Vegar
MVP
MVP

If you are able to make adjustment in your Load script then you could just add a week field like I've done below. 

LOAD 

Date, 

Week(Date) as Week, 

WeekName(Date) as YearWeek, 

TIR 

From YourSource;

alexandernatale
Creator II
Creator II
Author

yes I have already made the change to the script ... the problem is that the daily difference and then the weekly sum are not calculated. Can you help me? Basically, the formula should calculate the difference between the individual days (because TIR is nothing more than the daily stock) and then add it weekly. In this way, I can measure the weekly variation.

alexandernatale
Creator II
Creator II
Author

@sunny_talwar

I ask you to help me since you have already done it perfectly in the past!

 

I try: =sum({<Data={'$(=weekstart(Data))'}>} TIR)-sum({<Data={'$(=endstart(Data))'}>} TIR)

 

but don't work.

Any suggestions? Tnx!

Kushal_Chawda

@alexandernatale  It will be better if you can share on example with expected output

alexandernatale
Creator II
Creator II
Author

thanks @Kushal_Chawda for the reply!

I'd like a weekly difference..from this table 

Schermata 2020-10-23 alle 13.17.18.png

 to this table:

 

Schermata 2020-10-23 alle 13.12.47.png

 In the first table, the =sum(TIR) daily, is the value of the stock. 

I want to know, weekly, the change in stock