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

converting weekly values to daily

Hello All,

I have a table with values at weekly basis which is something like

itemweek start datevalue
14/2/201621
14/9/201624
14/16/201614

I have to perform some daily calculations so I want to load this as a daily table with values converted to daily (divide by 7) such as

itemdatevalue
14/2/20163
14/3/20163
14/4/20163
14/5/20163
14/6/20163
14/7/20163
14/8/20163
14/9/20163.4

I do not specifically have to load this in this manner as long as I can perform daily calculation within the script if there is a way.

Can anyone help me with this?

Please note that I am using personal edition so I would not be able to open qvd files.

thanks,

Manoj Agrawal

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Table:

LOAD item,

  Date([week start date] + IterNo() - 1) as Date,

  value/7 as value

While IterNo() <= 7;

LOAD item,

    [week start date],

    value

FROM

[https://community.qlik.com/thread/228671]

(html, codepage is 1252, embedded labels, table is @1);

View solution in original post

2 Replies
sunny_talwar

May be this:

Table:

LOAD item,

  Date([week start date] + IterNo() - 1) as Date,

  value/7 as value

While IterNo() <= 7;

LOAD item,

    [week start date],

    value

FROM

[https://community.qlik.com/thread/228671]

(html, codepage is 1252, embedded labels, table is @1);

Not applicable
Author

Man, I have been using QlikView for a while but where do you learn to write scripts like these? 🙂

Works great. Thanks!