Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trouble comparing 2 tables

Greetings,

I'm trying to compare 2 tables which i created with this script:

Argu:

LOAD

    "Code système U-VM",

    "OS-VM"

FROM [lib://AttachedFiles/VMWare.qvd](qvd)

where wildmatch("OS-VM", '*Red*')=1;

left join

LOAD

    "Code système U-Name" as "Code système U-VM",

    [OS installé sur le serveur]

FROM [lib://AttachedFiles/Isilog.qvd](qvd);

Argu2:

NoConcatenate

LOAD *

RESIDENT Argu;

Drop TABLE Argu;

It work well except that in table chart it give me this

Capture.PNG

But i'm not supposed to have those lasts field on the right my join was supposed to make appear only result that have a "Code système U-VM". Which is why i'm lost x_x

1 Solution

Accepted Solutions
undergrinder
Specialist II
Specialist II

Hi Vincent,

Argu:

LOAD

    "Code système U-VM",

    "OS-VM"

FROM [lib://AttachedFiles/VMWare.qvd](qvd)

where wildmatch("OS-VM", '*Red*')=1;

left join(Argu)

LOAD

    "Code système U-Name" as "Code système U-VM",

    [OS installé sur le serveur]

FROM [lib://AttachedFiles/Isilog.qvd](qvd);

should be enough, I can't see why is important the Argu2 block, that do not provide any new step.

I don't know why seems your table, like Qlik performs right join. I suggest you observe the data in Data Model Viewer preview, to see the underlying table.

G.

View solution in original post

6 Replies
MK9885
Master II
Master II

Maybe use Outer Join instead of left join?

Or check if you have suppressed the nulls for "Code système U-VM"

undergrinder
Specialist II
Specialist II

Hi Vincent,

Argu:

LOAD

    "Code système U-VM",

    "OS-VM"

FROM [lib://AttachedFiles/VMWare.qvd](qvd)

where wildmatch("OS-VM", '*Red*')=1;

left join(Argu)

LOAD

    "Code système U-Name" as "Code système U-VM",

    [OS installé sur le serveur]

FROM [lib://AttachedFiles/Isilog.qvd](qvd);

should be enough, I can't see why is important the Argu2 block, that do not provide any new step.

I don't know why seems your table, like Qlik performs right join. I suggest you observe the data in Data Model Viewer preview, to see the underlying table.

G.

Anonymous
Not applicable
Author

I need argu2 to rename the Null into my table since some fields aren't in, i don't want to have them as - since i need to select them in charts.

That's the only method i know to do that unfortunately. Gonna look into the data model then 😃

undergrinder
Specialist II
Specialist II

I see, so the final script for the table is not like "LOAD * ...."

MK9885
Master II
Master II

Maybe try below script?

Argu:

Load*,

If(Len(Trim("Code système U-VM")) = 0, 'Null',"Code système U-VM")  as "Code système U-VM."

If(Len(Trim("OS-VM")) = 0, 'Null'," "OS-VM"")  as " "OS-VM"." ;

LOAD

    "Code système U-VM",

    "OS-VM",

FROM [lib://AttachedFiles/VMWare.qvd](qvd)

where wildmatch("OS-VM", '*Red*')=1;

left join

LOAD

    "Code système U-Name" as "Code système U-VM.",

    [OS installé sur le serveur]

FROM [lib://AttachedFiles/Isilog.qvd](qvd);

//to get Null instead of '-'

Anonymous
Not applicable
Author

I resigned and did it with the - value.

Thanks for those answers!