Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculate values (difficult)

Hi there,

I have the following problem:

I have a table containing article-data (sample-data):

ARTICLE_IDPRODUCTGROUP_IDSTARTDATEADDED_AT_DATEVALUE
1111100
1151200
2211300
3213400

Now what I need to do is to add a field to every row of this table.

Those fields are calculated by summing up all values of the table which have the same productgroup-id as in the current row and also need to have added_at_date in between the startdate and the startdate + 7.

Is there an efficient way to solve this problem?

I tried to create a new table called productgroup, which contains data like the productgroup_id, added_ad_date and dailyvalue (dailyvalue is an accumulation of all values for every productgroup_id and added_ad_date).

Doing so I am clueless about how to accumulate the data out of this table for every article_id in the article-table, since it would need to be accumulated for every row over a dynamic amount of rows in the productgroup-table.

I hope you can help me with ideas or techniques to solve this problem

10 Replies
Anonymous
Not applicable
Author

First I seperate the data into productgroups.

After this I take every article_id and sum up all values, whose added_at_date lies within the initial startdate and the startdate + 7 of the article_id-row.

Explanation.bmp