Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
bmensing
Contributor III
Contributor III

Concatenate and Join

Good day,

i've got three tables and i wanna merge them together. Let's say the tables are as follows

Table A:

#         date                   time          turnover(Product A)

234     01.07.2017        09:21        1000

236     04.08.2017        09:35        1500

Table B:

#         date                   time          turnover(Product B)

234     01.07.2017        09:21          500

236     04.08.2017        10:35          800

237     04.08.2017        11:32          400

Table C:

#         date                   time          turnover(Product C)

234     04.08.2017        10:35         100

239     13.09.2017        14:35          600

237     16.08.2017        11:32          400

and the endresult in a table Chart after selected the field '#'  to 234 should look like this:

date               time        turnover(Product A)     turnover(Product B)     turnover(Product C)

01.07.2017    09:21      1000                            500                                -

04.08.2017    10:35         -                                -                                     100

9 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

your script should be

load * from table 1;

join

load * from table 2;

join

load * from table 3;

Anil_Babu_Samineni

What if you do direct load and create Table in front end

Even Concatenate Should work, This case

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bmensing
Contributor III
Contributor III
Author

but if i do so, i have one table with two date and two time fields like:

TableA.date

TableB.date

TableC.date

i just wanna have one field for the date and one field for the time

bmensing
Contributor III
Contributor III
Author

Looks good but the dimension is refering to which field? like i said i have

three date fields

TableA.date

TableB.date

TableC.date

nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hi,

please do not join - as the structure of all three tables seems to be similar.

use concate to append the table with Flag. for example :

load *,'Product A' as Flag

from table A;

Concatenate

load *,'Product B' as Flag from table B;

Concatenate

load *,'Product C' as Flag from table C;

This will create single table, then use flag to identify the products.

Regards,

Nilesh

PrashantSangle

Hi,

rename those field which you want to be same

for example

tableA.date as date

tableB.date as date

tableC.date as date

do similar for time field also

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
marcus_malinow
Partner - Specialist III
Partner - Specialist III

Do you have a QUALIFY statement in your code? If so, get rid of it, and you'll end up with a single date field.

Anil_Babu_Samineni

When you do with Concatenate / Join it just clubs to each table in single only. So, Don't require to specific which you expect. Simply use date as dimension. It clubs and showing?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
effinty2112
Master
Master

Hi Bernd,

Maybe

Table:

LOAD

'A' as Product,

*;

LOAD * Inline [

#,date, time, turnover

234,  01.07.2017,  09:21,  1000

236,  04.08.2017,  09:35,  1500

];

LOAD

'B' as Product,

*;

load * Inline [

#,date, time, turnover

234,  01.07.2017,  09:21, 500

236,  04.08.2017,  10:35, 800

237,  04.08.2017,  11:32, 400

];

LOAD

'C' as Product,

*;

load * Inline [

#,date, time, turnover

234,  04.08.2017,  10:35,100

239,  13.09.2017,  14:35, 600

237,  16.08.2017,  11:32, 400

];

Then a pivot table

date time Product ABC
01.07.201709:21 1000500-
04.08.201710:35 --100

cheers

Andrew