Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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

12 Replies
sunny_talwar

Can you try this

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

sunny_talwar

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