Charting

Charting

Bargraph for Employees/Hour when I only have start and stop times

Contributor

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?

Tagged:

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answer

  • Coach
    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!**

Answers

  • Coach
    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!**
  • Contributor

    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.

  • Coach
    edited April 2024

    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 WHEN HourSegments 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! **

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In