Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Huanna
Contributor II
Contributor II

Joining three or more tables

Hi guys ,


 I'm trying  to do Left join in three tables,  I need to relate the "Sequencia" and bring the "Ganho" .  The "Ganho" field of the tables has no relation, only "Sequencia",  but in the second Join  the script doesn't  have the "Ganho" value, I believe it is comparing with the "Ganho" field of the first join. 

I need the "Ganho" values to be in the same field.

help me please!!

Series_definições:
CrossTable(Fase, Sequencia, 5)
LOAD
HUB,
Época,
Polo,
"Ano da Campanha",
"Inoculação de Seedlings",
"Fase 1 - Avaliação",
"Fase 1 - Seleção",
"Fase 2",
"Fase 3",
"Fitoteste Carvão e Mosaico",
"Fitoteste Ferrugens",
"Fase 4"
FROM [lib://MGC/Séries_definições.xlsx]
(ooxml, embedded labels, header is 6 lines, table is [Sequências das séries]);

Left Join(Series_definições)
LOAD
SEQ2 as Sequencia,
Ganho
FROM [lib://MGC/3. Fase 1/KPI31/testes-huanna/dtf_GanhoTPH.xlsx]
(ooxml, embedded labels, table is dtf_GanhoTPH);

Left Join(Series_definições)
LOAD
SEQ2 as Sequencia,
Ganho
FROM [lib://MGC/6. Fase 4/KPI33/dtf4_GanhoTPH.xlsx]
(ooxml, embedded labels, table is dtf4_GanhoTPH);

 

1 Solution

Accepted Solutions
Vegar
MVP
MVP

You are absolutely correct in your analysis, you are joining on the Ganho-value in the second join.

Try this.

Series_definições:
CrossTable(Fase, Sequencia, 5)
LOAD
HUB,
Época,
Polo,
"Ano da Campanha",
"Inoculação de Seedlings",
"Fase 1 - Avaliação",
"Fase 1 - Seleção",
"Fase 2",
"Fase 3",
"Fitoteste Carvão e Mosaico",
"Fitoteste Ferrugens",
"Fase 4"
FROM [lib://MGC/Séries_definições.xlsx]
(ooxml, embedded labels, header is 6 lines, table is [Sequências das séries]);

Ganho:
LOAD
SEQ2 as Sequencia,
Ganho
FROM [lib://MGC/3. Fase 1/KPI31/testes-huanna/dtf_GanhoTPH.xlsx]
(ooxml, embedded labels, table is dtf_GanhoTPH);

Concatenate (Ganho) LOAD SEQ2 as Sequencia, Ganho FROM [lib://MGC/6. Fase 4/KPI33/dtf4_GanhoTPH.xlsx] (ooxml, embedded labels, table is dtf4_GanhoTPH);

Left Join(Series_definições)
Load * FROM Ganho;
DROP TABLE Ganho;

View solution in original post

4 Replies
vvira1316
Specialist II
Specialist II

Hi,

What is the problem you are running into? Will you be able to share Sample data files?

you may want to understand how cross table load works in qlik. Please refer to following link.

https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/LoadData/wor...

 

Huanna
Contributor II
Contributor II
Author

Hi,

I'm not having problem  with crosstable , I'm not seeing the "Ganho" values of the second Join. I need it to match the sequence number and bring the "Ganho" value in both Join.

First Join result:

join1.JPG

SecondJoin result:

Does not bring the "Ganho" values.

join2.JPG

Thanks!

Vegar
MVP
MVP

You are absolutely correct in your analysis, you are joining on the Ganho-value in the second join.

Try this.

Series_definições:
CrossTable(Fase, Sequencia, 5)
LOAD
HUB,
Época,
Polo,
"Ano da Campanha",
"Inoculação de Seedlings",
"Fase 1 - Avaliação",
"Fase 1 - Seleção",
"Fase 2",
"Fase 3",
"Fitoteste Carvão e Mosaico",
"Fitoteste Ferrugens",
"Fase 4"
FROM [lib://MGC/Séries_definições.xlsx]
(ooxml, embedded labels, header is 6 lines, table is [Sequências das séries]);

Ganho:
LOAD
SEQ2 as Sequencia,
Ganho
FROM [lib://MGC/3. Fase 1/KPI31/testes-huanna/dtf_GanhoTPH.xlsx]
(ooxml, embedded labels, table is dtf_GanhoTPH);

Concatenate (Ganho) LOAD SEQ2 as Sequencia, Ganho FROM [lib://MGC/6. Fase 4/KPI33/dtf4_GanhoTPH.xlsx] (ooxml, embedded labels, table is dtf4_GanhoTPH);

Left Join(Series_definições)
Load * FROM Ganho;
DROP TABLE Ganho;
Huanna
Contributor II
Contributor II
Author

It worked, thank you so much for the help!!