Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

How to get count of values from second table based on values present in 1st table , without using joins ?

Hi All ,

How to get count of values from second table based on values present in 1st table , without using joins ?

which means both table are not linked (associated) to each other in qlik terms .

Example : In table 1 i have field : Visitor , which has values  A , B ,C etc . Similarly i have a field called Emp in second table .

                 So i wanted to show count of all the entries of A , B and C in Emp field of second table

I have attached sample data with output .

lkup.png

1 Solution

Accepted Solutions
shekhar_analyti
Specialist
Specialist
Author

Sorry Bhai , for not being articulate . However answer to below will help

:Lookup , if found then how many times it's found in non related table . Please Help !

Thanks & Regards

Shekar

View solution in original post

8 Replies
sunny_talwar

Check attached

Capture.PNG

chinnuchinni
Creator III
Creator III

!

chinnuchinni
Creator III
Creator III


NULLASVALUE '-' ;


Companyvisit:

LOAD Company,

Visitor,

Date

FROM (ooxml, embedded labels, table is Sheet2);


empvist:


LOAD Emp,

Store,

  Date

FROM (ooxml, embedded labels, table is Sheet3);


abc:

load Visitor as Name,num(Count(Visitor))as cmpnyvisit Resident Companyvisit Group by Visitor ;


join(abc)

xyz:

load Emp as Name,num(Count(Emp))as storevisit Resident empvist Group by Emp ;



a123:

load Name,(cmpnyvisit+storevisit) as total Resident abc ;



DROP Tables Companyvisit,empvist ;


EXIT SCRIPT ;







294780.PNG

shiveshsingh
Master
Master

May be this?

You can make a dummy field and then match it with both the tables(name),

shekhar_analyti
Specialist
Specialist
Author

Hi Sunny Bhai ,

Actually i needed only data from Visitor field of Company Visitor table not Emp data ,

what i see in your attachment is , that data from Visitor and Emp both are concatenated .

Also both table should not be related , but currently it is related by date field which should not be the case

Thanks & Regards

Shekar

shekhar_analyti
Specialist
Specialist
Author

Hi Praveen ,

As mentioned earlier , join is not the requirement .

sunny_talwar

I am not sure I follow.... do you want to expand on this a little.

shekhar_analyti
Specialist
Specialist
Author

Sorry Bhai , for not being articulate . However answer to below will help

:Lookup , if found then how many times it's found in non related table . Please Help !

Thanks & Regards

Shekar