Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, i have two me id's where there is similar id's in two tables. i need to find intersection of them. Is the below one correct?
count(distinct ME1)*count({<Type = {'Interactions'}>}distinct [ME ID])
ME1, [ME ID] are the two id's from two different tables
Would you be able to show it with a help of a sample to show what you have and what you are trying to count?
Hi Sunny, Thnx for reply. Just imagine there are two tables one table is having one set of me id's with id name "ME1" the other table is having set of me id's with id name "[ME ID]" . As shown in previous post, I need to find intersection of me id's(it means two tables are having common me id's)
May be this
Count(DISTINCT {<[ME ID] = P(ME1)>} [ME ID])
will add some example later on , meanwhile can you help me with resident load not working with where exists?
THanks in advance
ME:
LOAD
ME1,
abc
from file.xyz;
Interactions:
LOAD
"ME ID",
"MSL ID"
from file2.xyz;
inc:
load
"ME ID" as ME_ID_Incn,
"MSL ID" as MSL_ID_Incn
Resident Interactions
Where Exists(ME1);
May be try this
Where Exists(ME1, "ME ID");
Thanks Sunny for Reply!! but it is giving id's which are in other table I want only id's which are same as in table where ME1 is present.
Can you share few rows of data from each table and explain what the output needs to look like from the sample data you have shared?
Hi Thanks,
For your understanding I am attaching excel, which has two tables "interactions" and "ME". Say ME is like doctor and MSL is like salesrep. MSL's have specifically assigned me's to them and they make interactions. In general msl's can interact with me's even though some ME is not assigned to them.
Interaction data is given in "interactions" table, me's assigned to msl is given in "ME" table.
Now my requirement is I have to find count of me's which have interactions only with me's assigned to them. So is why I wrote below script:
ME:
LOAD
ME1,
abc
from file.xyz;
Interactions:
LOAD
"ME ID",
"MSL ID"
from file2.xyz;
inc:
load
"ME ID" as ME_ID_Incn,
"MSL ID" as MSL_ID_Incn
Resident Interactions
Where Exists(ME1);
The inc table should ideally give msl details who have interacted with me's present in "ME" table. Hope this is clear.