Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I would like to speed up calculations in application by putting it on script level.
I need to create another column with a calculation so it will speed up my application.
So here is the data:
Table 1 - Cars
Model | S/N | Delivery |
---|---|---|
A | 111 | 10/10/2015 |
B | 222 | 10/10/2015 |
A | 112 | 11/10/2015 |
C | 333 | 13/10/2015 |
Table 2 - Maintenance
Model | Timeframe (Days) | MO | Type of maintenance | US$ |
---|---|---|---|---|
A | 10 | 6 | XXX | 100 |
A | 10 | 6 | yyy | 150 |
A | 15 | 7 | ZZZ | 200 |
B | 10 | 6 | XXX | 100 |
B | 10 | 6 | yyy | 150 |
C | 30 | 9 | AbAb | 200 |
I would like to sum "Delivery" with "Timeframe" and name it as "date of maintenance" and put in Table 3.
Here is my desired Table:
Table 3:
Model | S/N | Delivery | Date of Maintenance | MO | Type of Maintenance | US$ |
---|---|---|---|---|---|---|
A | 111 | 10/10/2015 | 20/10/2015 | 6 | XXX | 100 |
A | 111 | 10/10/2015 | 20/10/2015 | yyy | 150 | |
A | 111 | 10/10/2015 | 25/10/2015 | 7 | ZZZ | 200 |
B | 222 | 10/10/2015 | 20/10/2015 | 6 | XXX | 100 |
B | 222 | 10/10/2015 | 20/10/2015 | 6 | yyy | 150 |
A | 112 | 11/10/2015 | 21/10/2015 | 6 | XXX | 100 |
A | 112 | 11/10/2015 | 21/10/2015 | 6 | yyy | 150 |
A | 112 | 11/10/2015 | 26/10/2015 | 7 | ZZZ | 200 |
C | 333 | 13/10/2015 | 12/11/2015 | 9 | AbAb | 200 |
I will appreciate If someone can help me! Just though of creating another table because it will simplify the view, but if you have an easier way it would be great!
thanks in advance.
Try this:
Table:
LOAD Model,
[S/N],
Delivery
FROM
[https://community.qlik.com/thread/189588]
(html, codepage is 1252, embedded labels, table is @1);
Join(Table)
LOAD Model,
[Timeframe (Days)],
MO,
[Type of maintenance],
US$
FROM
[https://community.qlik.com/thread/189588]
(html, codepage is 1252, embedded labels, table is @2);
FinalTable:
LOAD *,
Date(Delivery + [Timeframe (Days)]) as [Date of Maintenance]
Resident Table;
DROP Table Table;
Try this:
Table:
LOAD Model,
[S/N],
Delivery
FROM
[https://community.qlik.com/thread/189588]
(html, codepage is 1252, embedded labels, table is @1);
Join(Table)
LOAD Model,
[Timeframe (Days)],
MO,
[Type of maintenance],
US$
FROM
[https://community.qlik.com/thread/189588]
(html, codepage is 1252, embedded labels, table is @2);
FinalTable:
LOAD *,
Date(Delivery + [Timeframe (Days)]) as [Date of Maintenance]
Resident Table;
DROP Table Table;
Thank you very much!
it helped a lot.
Awesome
I am glad it did help. Would you mind closing this thread by marking the correct answer.
Best,
Sunny