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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil-kumar5
Creator II
Creator II

Bad hires

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.

 

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

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())

dim.PNG

View solution in original post

2 Replies
jwjackso
Specialist III
Specialist III

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())

dim.PNG

sunil-kumar5
Creator II
Creator II
Author

Hi,

Thanks for the solution, Its working absolutely fine!!