Turnover Beast Mode: Avg Distinct Count / Days in date range

I am attempting to create a Turnover Rate beast mode that would take the Average Distinct Count of employee IDs, then divide it by the number of days in the user selected date range.
I've tried the following syntax, but I receive an error:
Raw syntax:
AVG(COUNT(DISTINCT CASE WHEN Team Member status
= 'Active' OR Team Member status
= 'Unpaid Leave' THEN Team Member ID
END))
/
COUNT(DISTINCT Date Scaffold
)
Does anyone have experience with Turnover in Domo? Am I missing something obvious in my syntax?
Best Answer
-
You need to use Magic ETL Rank and Window tile to get turnover rate. Here is how you do it:
- Take the cumulative sum of employees hired (can be by department, job title, or cost center, as needed). This will be done using the rank and window tile (settings = sum preceding unbounded to following zero) by counting employee ids by their hire date, partitioning by department, job title, etc.
- Sum the total employees terminated by day.
- Group by the desired time interval. For example, if you want to see monthly turnover rate, group the cumulative sum of employees using AVG, and the terminated number of employees using SUM. Include the partition in the group by, if applicable.
- Turnover Rate = SUM Terminated Employees / AVG Cumulative employees
- Create your card. I suggest line chart or mega table with partition as rows, date as columns, turnover rate heat mapped.
P.S You should include supplemental information alongside these visuals, such as Most recent hires and terminations by department, title, etc. Total headcount by department, title, etc. This will give the viewer a more complete understanding of employee turnover.
0
Answers
-
You need to use Magic ETL Rank and Window tile to get turnover rate. Here is how you do it:
- Take the cumulative sum of employees hired (can be by department, job title, or cost center, as needed). This will be done using the rank and window tile (settings = sum preceding unbounded to following zero) by counting employee ids by their hire date, partitioning by department, job title, etc.
- Sum the total employees terminated by day.
- Group by the desired time interval. For example, if you want to see monthly turnover rate, group the cumulative sum of employees using AVG, and the terminated number of employees using SUM. Include the partition in the group by, if applicable.
- Turnover Rate = SUM Terminated Employees / AVG Cumulative employees
- Create your card. I suggest line chart or mega table with partition as rows, date as columns, turnover rate heat mapped.
P.S You should include supplemental information alongside these visuals, such as Most recent hires and terminations by department, title, etc. Total headcount by department, title, etc. This will give the viewer a more complete understanding of employee turnover.
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 7 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 655 Datasets
- 114 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 770 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 76 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 408 Distribute
- 119 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive