Hi,
want to achieve daily,weekly ,monthly, yearly report
empDirectory.csv contains Employee ID,Employee Name, Manager ,ManagerID
one.CSV contains Date1 and EMP_ID1
Two.csv contains Date2 and EMP_ID2
want to compare employee from Two.csv  is present in one.csv on particular date. 
below is my query. 
| inputlookup one.CSV
|dedup EMP_ID1,Date
|lookup empDirectory.csv EMP_ID as EMP_ID1
|search ManagerID=Manager1
|table Date1,EMP_ID1,ManagerID
|join
[ inputlookup two.CSV
|dedup EMP_ID2, Date2
|lookup empDirectory.csv EMP_ID as EMP_ID2
|search ManagerID=Manager1
|table Date2,EMP_ID2]
|table Date1,EMP_ID1,ManagerID,Date2,EMP_ID2
|eval GoodEMP=if(EMP_ID1=EMP_ID2, "Good", "NotGood")
|search GoodEMP=GoodEMP
|table GoodEMP,Employee ID,Employee  Name, Manager ,ManagerID
extending above query to timechart
|timechart count(GoodEMP) as GoodEMP by Date2
expected result
Total number of GoodEMP per day under manager 
want to create monthly,weekly, yearly graph 
 
		
		
		
		
		
	
			
		
		
			
					
		A couple of things which don't look quite right, although since this looks like a anonymised example, perhaps they are OK in your real search
The two halves of the join don't have any common fields so nothing will join.
Assuming this is fixed so that you can join by id and date, you could move the look up for manager to after the join so you only need to do it once.
If you do a left join, and join by id and date, and include a field from the second search that isn't in the first search, you will be able to tell which are good (by the presence of the field), e.g. eval good="Good"
