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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive