Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vincent_bellang
New Contributor III

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

Tags (2)
1 Solution

Accepted Solutions
undergrinder
Valued Contributor II

Re: Trouble comparing 2 tables

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.

6 Replies
Khan_Mohammed
Honored Contributor II

Re: Trouble comparing 2 tables

Maybe use Outer Join instead of left join?

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

undergrinder
Valued Contributor II

Re: Trouble comparing 2 tables

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.

vincent_bellang
New Contributor III

Re: Trouble comparing 2 tables

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
Valued Contributor II

Re: Trouble comparing 2 tables

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

Khan_Mohammed
Honored Contributor II

Re: Trouble comparing 2 tables

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 '-'

vincent_bellang
New Contributor III

Re: Trouble comparing 2 tables

I resigned and did it with the - value.

Thanks for those answers!

Community Browser