Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Viewers,
how to create flage for
same employees(emp id) which having different doj
Any help will be appreciated!
Check the sample app attached
MainTable_tmp:
LOAD EmpID,
Doj
FROM
[Cartel1.xlsx] (ooxml, embedded labels, table is Foglio1);
left join(MainTable_tmp)
load
EmpID,
count( distinct Doj) as NumOfDoj
Resident MainTable_tmp
group by EmpID;
MainTable:
NoConcatenate
load
EmpID,
Doj,
NumOfDoj,
if(NumOfDoj>1,1,0) as FlagMultipleDoj
Resident MainTable_tmp;
drop Table MainTable_tmp;
Hi
Thanks for all your suggestions and sorry for my late response.
Still I have been suffering on the same.
I have tried all the ways as you suggested
but still not getting accurate results.
Can you look at my application and suggest where I did wrong?
PFA for your reference!!!
Pls help!!!
Hi Avinash,
can you look @ my application which I shared in the above!!
Try this script
t1:
LOAD id,
Date(doj,'DD-MMM-YY') as doj,
type
FROM
(ooxml, embedded labels, table is May);
LOAD id,
Date(doj,'DD-MMM-YY') as doj,
type
FROM
(ooxml, embedded labels, table is Jun);
left join
LOAD
id,
Count(DISTINCT doj) as count
Resident t1
Group By id;
final:
NoConcatenate
LOAD *,
If(count>1,1,0) as flag1
Resident temp;
DROP Table t1;;
Hi Avinash,
Thanks for your quick response!!
Still facing same problem on count in which we have created with
Count(distinct doj) is giving us non-exact results.
Anymore suggestions???
Count(distinct doj) is giving us non-exact results?
could you explain what your excepting ?
What is your expected output?
Yes avinash,
only id 924 is getting accurate result count(Distinct doj) is 2(2 different doj for same id)
But rest of the id's having same doj's so the result should be 1(count for id 85041, it should be 1)
PFA snapshot for your reference!!!
Hi Tresesco,
Kindly look@ my application
count(distinct doj) is not giving exact result
Please suggest where I did wrong.?