I work with HR data and I want to be able to trend turnover rates.
Essentially the problem is getting Tableau to chart a date and count/sum any records where the hire date is before or on the date increment (whether day, month, year) and the termination date or Max-date is on or after the date increment.
In the attached worksheet there are two datasets, both use the SuperStore data (modified for my purposes).
- The data set "Customer Churn with MIN MAX dates by customer" has the data structured the way I want it (but I'm unable to create the VIZ)
I created a "Date of First Order" field. This is similar to an employee's hire date. It is the minimum order-date for each customer.
The "Min-Date" field is '1/1/2010' for most customers unless their first order was later (but before 2012).
The "Max-Date" field is the date of the customer last order, or '12/31/2011' if the last order was in 2012. (Anyone with the last order in 2009 was excluded)
I limited the data to 2010 and 2011 because this makes it look more like employee turnover data where each report has a large group who've been on-board for years. And another large group who have not terminated and continue on after the end of the date range.
- The data set "Individual Dates with count of Customers and Lost Customers" has the data structured by day with a count of total, new and lost customers. I have a rudimentary chart called "Desired Viz" to show what I'm looking to create with the other dataset.
The "individual dates..." dataset may seem fine, but when you multiply these dates over several years and have one row for 2000+ departments for each date it's a question of a few million rows or <100K rows (one for each employee).
I am wondering if a table calculation or running_sum or running_avg is the answer?
I previously posted this question here: