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
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive