Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two sample files as below
file1 .csv | ||
Date Time | SalesQty | SalesValue |
01-01-15 0:58 | 261 | 26100 |
01-01-15 7:30 | 109 | 10965 |
01-01-15 9:34 | 8 | 564 |
01-01-15 9:37 | 112 | 453 |
01-01-15 9:39 | 23 | 342 |
file2 | ||
Agent.ID | Queue.Time.Secs. | HoldTime |
4024 | 7 | 30 |
4024 | 15 | 30 |
4016 | 6 | 30 |
4011 | 4 | 4 |
4031 | 0 | 30 |
I want to combine these two files while loading such as final file will be
Date Time | SalesQty | SalesValue | Agent.ID | Queue.Time.Secs. | HoldTime |
01-01-15 0:58 | 261 | 26100 | 4024 | 7 | 30 |
01-01-15 7:30 | 109 | 10965 | 4024 | 15 | 30 |
01-01-15 9:34 | 8 | 564 | 4016 | 6 | 30 |
01-01-15 9:37 | 112 | 453 | 4011 | 4 | 4 |
01-01-15 9:39 | 23 | 342 | 4031 | 0 | 30 |
What will be the Query??
Thanks,
Bibhuti
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))
));
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))
));
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
Not a problem