Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

I have two sample files as below I want to combine these two files while loading.

I have two sample files as below

                                              

file1 .csv
Date TimeSalesQtySalesValue
01-01-15 0:5826126100
01-01-15 7:3010910965
01-01-15 9:348564
01-01-15 9:37112453
01-01-15 9:3923342

file2
Agent.IDQueue.Time.Secs.HoldTime
4024730
40241530
4016630
401144
4031030

I want to combine these two files while loading such as final file will be

Date TimeSalesQtySalesValueAgent.IDQueue.Time.Secs.HoldTime
01-01-15 0:58261261004024730
01-01-15 7:301091096540241530
01-01-15 9:3485644016630
01-01-15 9:37112453401144
01-01-15 9:39233424031030


                                                                                                                                                                           

What will be the Query??

Thanks,

Bibhuti

1 Solution

Accepted Solutions
stalwar1
Not applicable

Re: I have two sample files as below I want to combine these two files while loading.

May be join them on RowNo() like this:

Table:

LOAD RowNo() as Join,

  @1 as [Date Time],

    @2 as SalesQty,

    @3 as SalesValue

FROM

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

(html, codepage is 1252, no labels, table is @1, filters(

Remove(Row, Pos(Top, 3)),

Remove(Row, Pos(Top, 2)),

Remove(Row, Pos(Top, 1))

));

Join (Table)

LOAD RowNo() as Join,

  Agent.ID,

    Queue.Time.Secs.,

    HoldTime

FROM

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

(html, codepage is 1252, embedded labels, table is @2, filters(

Remove(Row, Pos(Top, 2)),

Remove(Row, Pos(Top, 1))

));


Capture.PNG

3 Replies
stalwar1
Not applicable

Re: I have two sample files as below I want to combine these two files while loading.

May be join them on RowNo() like this:

Table:

LOAD RowNo() as Join,

  @1 as [Date Time],

    @2 as SalesQty,

    @3 as SalesValue

FROM

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

(html, codepage is 1252, no labels, table is @1, filters(

Remove(Row, Pos(Top, 3)),

Remove(Row, Pos(Top, 2)),

Remove(Row, Pos(Top, 1))

));

Join (Table)

LOAD RowNo() as Join,

  Agent.ID,

    Queue.Time.Secs.,

    HoldTime

FROM

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

(html, codepage is 1252, embedded labels, table is @2, filters(

Remove(Row, Pos(Top, 2)),

Remove(Row, Pos(Top, 1))

));


Capture.PNG

Not applicable

Re: I have two sample files as below I want to combine these two files while loading.

Thanks Mr Sunny,

This code works fine for me.

Table1:

LOAD RowNo() as JOIN,

    "Date Time",

    SalesQty,

    SalesValue

FROM [lib://1.xlsx/1.xlsx]

(ooxml, embedded labels, table is Sheet1);

JOIN(Table1)

LOAD RowNo() as JOIN,

    Agent.ID,

    Queue.Time.Secs.,

    HoldTime

FROM [lib://1.xlsx/2.xlsx]

(ooxml, embedded labels, table is Sheet1);

Thanks for your valuable response.

Bibhuti

stalwar1
Not applicable

Re: I have two sample files as below I want to combine these two files while loading.

Not a problem