Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to create another Column in script

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

ModelS/NDelivery

A

111

10/10/2015

B22210/10/2015
A11211/10/2015
C33313/10/2015

Table 2 - Maintenance

ModelTimeframe (Days)MOType of maintenanceUS$
A106XXX

100

A106yyy150
A157ZZZ200
B106XXX100
B106yyy150
C309AbAb200

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:

ModelS/NDeliveryDate of MaintenanceMOType of MaintenanceUS$
A11110/10/201520/10/20156XXX100
A11110/10/201520/10/2015
6
yyy150
A11110/10/201525/10/20157ZZZ200
B22210/10/201520/10/20156XXX100
B22210/10/201520/10/20156yyy150
A11211/10/201521/10/20156XXX100
A11211/10/201521/10/20156yyy150
A11211/10/201526/10/20157ZZZ200
C33313/10/201512/11/20159AbAb200

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.

1 Solution

Accepted Solutions
sunny_talwar

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;


Capture.PNG

View solution in original post

3 Replies
sunny_talwar

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;


Capture.PNG

Anonymous
Not applicable
Author

Thank you very much!

it helped a lot.

sunny_talwar

Awesome

I am glad it did help. Would you mind closing this thread by marking the correct answer.

Best,

Sunny