Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with join

hello,

i have a problem with qlikview

i have two tables:

table1:

LOAD [ téléphone],

               [Nom ],

     [Période d],

     Month("Période ") as mois,

     Year("Période ") as année,

     [Montant ],

       [ rubrique],

     [ sous-rubrique],

     [ rubrique de niveau 1],

     [ rubrique de niveau 2]

resident Facture;

table2:

outer join Load [Catégorie],[Sous catégorie],[rubrique],

     [ sous-rubrique],

     [ rubrique de niveau 1],

     [ rubrique de niveau 2]  resident Catégories ;

Drop table Facture;

Drop table Catégories;

Facture and catégorie was declared before

i want to have the result like this:

NuméroNomMoisAnnéeMontantrubriquesous rubriquerubrique niveau 1rubrique niveau 2catégoriesous catégorie

i want to know if my reflexion aboutit is right?

thanks

6 Replies
rahulpawarb
Specialist III
Specialist III

Hello Anis,

If you want to join a Table1 with Table2 then you should have a common field between both the tables (with same name - case sensitive). You can make the necessary changes in your script accordingly.

Hope this will help.

Regards!

Rahul

avinashelite

Which tables your join ?

You need at least one common key between the tables otherwise it will lead to the cross join ...

Not applicable
Author

Thanks for the answer, but i have 4 common fields which are: rubrique, sous-rubrique, rubrique-niveau-1, rubrique-niveau-2 with the same names

rahulpawarb
Specialist III
Specialist III

Hello Anis,

If you have four common fields as stated above in both the tables and to relate data from one table with another you need four of them then you can create a complex key by concatenating these four fields in both the tables; post that remove/rename/qualify these four fields from one of the table(refer below sample key):

rubrique & '|' & sous-rubrique & '|' & rubrique-niveau-1 & '|' & rubrique-niveau-2 AS Key


Hope this will be helpful.


Regards!

Rahul

avinashelite

I feel the problem is with the data you have , could please share the sample data set and the app

Not applicable
Author

the problem is not with the data, because i use them for other treatment and it works good. iwill try the composite key perhaps it's the solution.

Thanks