Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a table with values at weekly basis which is something like
item | week start date | value |
---|---|---|
1 | 4/2/2016 | 21 |
1 | 4/9/2016 | 24 |
1 | 4/16/2016 | 14 |
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
item | date | value |
---|---|---|
1 | 4/2/2016 | 3 |
1 | 4/3/2016 | 3 |
1 | 4/4/2016 | 3 |
1 | 4/5/2016 | 3 |
1 | 4/6/2016 | 3 |
1 | 4/7/2016 | 3 |
1 | 4/8/2016 | 3 |
1 | 4/9/2016 | 3.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
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);
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);
Man, I have been using QlikView for a while but where do you learn to write scripts like these? 🙂
Works great. Thanks!