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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
jamesmf1982
Contributor III
Contributor III

Retention Summary

Hi,

I have a chart that returns the length of an employees retention on an employee by employee basis using the following statement:

if(isnull(EmployeeLeaveDate), if($(v_date_max) - EmployeeStartDate<365,1,0))

This works fine, however I need to be able to summarise this to give the overall retention of the office. I have tried summing it and counting but neither work.

In addition on my table whilst I have the sum at the top of the table it does not return any values.

Any help would be great.

James

Labels (1)
12 Replies
sunny_talwar
MVP
MVP

Can you try this

Sum(If(IsNull(EmployeeLeaveDate), If(Max(TOTAL  CalendarDate) - EmployeeStartDate < 365, 1, 0)))

sunny_talwar
MVP
MVP

Only thing I see off is the set analysis on StartDate... try this

Count({<EmployeeStatus -= {'Permanently Inactive'}, EmployeeStartDate = {"$(='>=' & Date(Today()-365))"}>} EmployeeCode)

jamesmf1982
Contributor III
Contributor III
Author

Awesome! Thanks for that