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

left join

Hello everyone

I have a table contains fields name, year,month,day and another table contains name, year,month

I wanna left join these two tables

How i can do that(i don't have a field day in second table and it causes repeating data )?


i would appreciate if someone can help

11 Replies
Gysbert_Wassenaar

Why do you think you need to join these tables?

Perhaps this blog post helps: Fact Table with Mixed Granularity


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

because these tables have other fields and i need to join

Anonymous
Not applicable
Author

i read the blog post but i can't understand completely for my problem

can you give me a solution with my tables?

nitin_01
Creator
Creator

Hi elham,

        I don't think so it would produce or create a repeating data after joining the tables but it might create missing values depending upon non-matching records.

 

Regards

Nitin

Anonymous
Not applicable
Author

example of my tables

table one

name,year,month,day...

elham,2010,02,22,...

elham,2010,02,21,....

left join

table 2

name,year,month,accident price

elham,2010,02,24000



accident price repeat 2 times because we have 2 rows in table 1

what can i do to solve this problem?

nitin_01
Creator
Creator

Hi elham,

     Capture2.PNG

output:

       Capture1.PNG

Regards,

Nitin.

Anonymous
Not applicable
Author

sorry i wrote a same day by mistake.

i correct above example please check it again

nitin_01
Creator
Creator

Hi elham,

           Yes it will repeat in this case, But there should be another key field in your data that identifies or mapped with your field 'accident price' that shows different value for each line of record and that will remove your repeating data.

You can add that field to remove duplication.

Regards,

Nitin.

Anonymous
Not applicable
Author

i don't have a field day in table2 , my "accident price" is for whole month not a specific day

is there any way to join these tables?