Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cdb
New Contributor II

Joining two tables

Hi guys

I m loading two tables using "web file" connection method in Data load editor.

Capture.JPG

When I show them in table it comes like this ... If you can see one record is getting repeated ...number of times....Can some híne help solve this issue.

Capture.JPG

1 Solution

Accepted Solutions
OmarBenSalem
Esteemed Contributor

Re: Joining two tables

when u join all u table, the resulting one would be one final table;

now try to adapt this to ur script:

YourTable:

load *, if(confluencePorts=HelpsitePorts,1,0) as Flag Inline [

confluencePorts  ,  HelpsitePorts

80, 80

80 , 444

443,80

443, 443

200, 80

];

Test:

Load confluencePorts AS Alert_confluencePorts where Flag=0;

Load confluencePorts, sum(Flag) as Flag Resident YourTable  Group by confluencePorts;

drop Field Flag From YourTable;


result:

Capture.PNG

8 Replies
OmarBenSalem
Esteemed Contributor

Re: Joining two tables

It's normal no?

if each ConfluencePort has many HelpSitePorts coming from multiple sources? No?

cdb
New Contributor II

Re: Joining two tables

Do you see the difference .... if I import them different tables it doesnt get repeated .... but get repeated if kept in one table ....how do I fix this?

Capture.JPG

OmarBenSalem
Esteemed Contributor

Re: Joining two tables

That's also normal;

for instance:

HelpSitePort = 80 is repeated but that normal; why?

because we have HelpSitePort = 80 linked to ConfulencePort =80

and

HelpSitePort = 80 linked to ConfulencePort =443

Capture.PNG


so when u just put as a list selection, the HelpSitePort  field; Qlik will show the disctinct existing values;

but when u put it in a table with the ConfulencePort , Qlik will link each combination of ConfulencePort -HelpSitePort  .


Hope this was clear !



cdb
New Contributor II

Re: Joining two tables

yes ,... I get it now ..but to get my app working ..I need  to check the confluence ports and Helpsite ports how do I do that ...

My do ..something like this .. If there is a port in confluence it should also be present in helspite port ..if it is not then I need to show it as a n alert

OmarBenSalem
Esteemed Contributor

Re: Joining two tables

let me try to understand;

if u have :

confluence ports  ,  Helpsite ports

80, 80

80 , 444

443,80

443, 443

200, 80


then u have a problem in the confulence Port 200; because u don't have Helpsite port =200 for the confluence one that is = 200

right?

cdb
New Contributor II

Re: Joining two tables

Right ..this I need to show in table for others to understand

OmarBenSalem
Esteemed Contributor

Re: Joining two tables

when u join all u table, the resulting one would be one final table;

now try to adapt this to ur script:

YourTable:

load *, if(confluencePorts=HelpsitePorts,1,0) as Flag Inline [

confluencePorts  ,  HelpsitePorts

80, 80

80 , 444

443,80

443, 443

200, 80

];

Test:

Load confluencePorts AS Alert_confluencePorts where Flag=0;

Load confluencePorts, sum(Flag) as Flag Resident YourTable  Group by confluencePorts;

drop Field Flag From YourTable;


result:

Capture.PNG

mdmukramali
Valued Contributor II

Re: Joining two tables

Hi Swathi,

did you try omarbensalem‌ reply?

if Yes and your problem was solved then please close this thread by marking correct and helpful answers.

so it will helpful for others who are looking for similar solution.

if you have any issues then attach a sample file to have a look.

Thanks,

Mukram.

Community Browser