Bargraph for Employees/Hour when I only have start and stop times
This will probably be obvious in retrospect, but I cannot figure out how to generate a chart based on the data I have. I have data in the following format:
Name | Store | Date | TimeIn | TimeOut |
---|---|---|---|---|
Alice | 0001 | 1/5/2024 | 6:00 | 12:00 |
Bob | 0001 | 1/5/2024 | 7:00 | 11:00 |
Charlie | 0001 | 1/5/2024 | 7:00 | 9:00 |
Denise | 0001 | 1/5/2024 | 8:00 | 12:00 |
What I need to do is get a bar chart showing the number of employees on shift per hour, something like this:
The chart needs to be cumulative across all days in the range so they can get a snapshot of what the staffing curve looks like.
The employee only counts if they work at least 15 minutes of the designated hour, so Alice will count only for 6:00 am to 11:00 am. Short of crafting an ETL that calculates if each employee is active for each hour of the workday (which would cause the dataset to balloon), how can I get a bar chart that shows this?
Best Answer
-
Domo can't fill in the dates automatically within the card, your only option is to expand your data set to be on a per hour basis instead of per day.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
Domo can't fill in the dates automatically within the card, your only option is to expand your data set to be on a per hour basis instead of per day.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
That's what I feared. So it looks like I'll have to use formulas to test each hour against the start and stop time, then unpivot to get a row per employee/hour. Thanks for your help.
0 -
I know the following isn't a "clean" solution….but may help you identify how to get your solution. Using something like this, you can identify the "hour" segments someone worked.
You could then count the occurrences within the hour segments. Such as getting the number of people working at six o'clock:
SUM(CASE WHENHourSegments
LIKE '%6%' THEN 1 ELSE 0 END)
And chart those.** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **1
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