Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I want to calculate as how many employees left the organization within six months, I have joining date, leaving date and emp_code field with me. I need to show it on a chart by using dimentions like 0,1,2,3,4,5,6 months.
Using this data:
Data:
Load * Inline [
emp_code,join_date,leave_date
E101,1/1/2020,1/15/2020
E102,1/1/2020,2/15/2020
E102B,1/1/2020,2/15/2020
E103,1/1/2020,3/15/2020
E104,1/1/2020,4/15/2020
E105,1/1/2020,5/15/2020
E105B,1/1/2020,5/15/2020
E105C,1/1/2020,5/15/2020
E106,1/1/2020,6/15/2020
E107,1/1/2020,7/15/2020
E108,1/1/2020,8/15/2020
E109,1/1/2020,
];
This is my dimension:
=If((Year(leave_date)*12 + Month(leave_date)) - (Year(join_date)*12 + Month(join_date)) <=6,(Year(leave_date)*12 + Month(leave_date)) - (Year(join_date)*12 + Month(join_date)),Null())
Using this data:
Data:
Load * Inline [
emp_code,join_date,leave_date
E101,1/1/2020,1/15/2020
E102,1/1/2020,2/15/2020
E102B,1/1/2020,2/15/2020
E103,1/1/2020,3/15/2020
E104,1/1/2020,4/15/2020
E105,1/1/2020,5/15/2020
E105B,1/1/2020,5/15/2020
E105C,1/1/2020,5/15/2020
E106,1/1/2020,6/15/2020
E107,1/1/2020,7/15/2020
E108,1/1/2020,8/15/2020
E109,1/1/2020,
];
This is my dimension:
=If((Year(leave_date)*12 + Month(leave_date)) - (Year(join_date)*12 + Month(join_date)) <=6,(Year(leave_date)*12 + Month(leave_date)) - (Year(join_date)*12 + Month(join_date)),Null())
Hi,
Thanks for the solution, Its working absolutely fine!!