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

Problems with left join

Hello!

I am quite new using QV, so please forget me if my question is silly. My problem is this, I am doing an app that calculates the hour cost of a company, the problem I have right now, is that I am not able to join two tables into one, with out missing some of the data -that is bad-, I was reading other posts, and after analyzing my script and my data model, I find out that my key is no the same between tables, even though it looks the same!, here the example:

table 1:

MonthAccount1Amount1
Ene 2015xxxxxx
Ene 2015xxxxxx
Ene 2015xxxxxx

table 2:

MonthAccount2Amount2
                    Ene 2015xxxxxx
                    Ene 2015xxxxxx
                    Ene 2015xxxxxx

The table moved a little, but I think the problem is clear. Even though the Month is written exactly the same, in table one is to the far left and in table 2 appears to the far right, and when I take the the "Month" dimension to the presentation, as a table I have two different values for "Month", written exactly the same, but one to the far right and other to the far left.

How can I fix this? What is the script line that I am missing to make this to match? Can you please help me???

Thank you.

6 Replies
sunny_talwar

On both your tables force both months to be dates like this:

MonthName(Date#(Trim(Month), 'MMM YYYY')) as Month

Hopefully this will solve your problem

Best,

Sunny

Not applicable
Author

it worked!!! thank you

Greetings.

sunny_talwar

No problem

I am glad I was able to help.

Best,

Sunny

sinanozdemir
Specialist III
Specialist III

When I do a left join, I don't get the same results as you get:

Cap.PNG

Capture2.PNG

ger_alegria
Partner - Creator
Partner - Creator

probably Qlikview is taking one of the months like string and the other one like number of Month. Try to put both fields as a string or as number and see the result.

Not applicable
Author

Yeah, those tables I draw them with the table tool here in the comment section, I am using excel tables, witch are a little more complex that this, but it worked, the trim function was the one that did the trick, thank you anyway

Greetings!