Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am struggling to display some time based data on a line chart using PowerBI Desktop and haven't had any luck searching for a solution.
I have data as per the small sample below from a timesheet system displaying the Date, staffID, Clock in Time, Clock Out time.
I am looking to create a line chart displaying time of day on the X axis and number of staff on site on the Y axis for an individual day.
ANy help or a point in the right direction would be appreciated.
| Date | StaffID | ManTimeIn | ManTimeOut |
| 4/4/17 0:00 | 3765 | 4/4/17 7:00 | 4/4/17 16:54 |
| 4/4/17 0:00 | 3942 | 4/4/17 7:00 | 4/4/17 15:30 |
| 4/4/17 0:00 | 4039 | 4/4/17 7:00 | 4/4/17 15:30 |
| 4/4/17 0:00 | 5191 | 4/4/17 7:00 | 4/4/17 16:54 |
| 4/4/17 0:00 | 5083 | 4/4/17 7:01 | 4/4/17 16:22 |
| 4/4/17 0:00 | 5163 | 4/4/17 7:01 | 4/4/17 13:54 |
| 4/4/17 0:00 | 3224 | 4/4/17 7:15 | 4/4/17 15:42 |
| 4/4/17 0:00 | 5442 | 4/4/17 7:15 | 4/4/17 16:32 |
| 4/4/17 0:00 | 5601 | 4/4/17 7:15 | 4/4/17 15:55 |
| 4/4/17 0:00 | 3941 | 4/4/17 7:18 | 4/4/17 16:38 |
| 4/4/17 0:00 | 3845 | 4/4/17 7:30 | 4/4/17 15:15 |
| 4/4/17 0:00 | 3647 | 4/4/17 7:33 | 4/4/17 15:08 |
| 4/4/17 0:00 | 5057 | 4/4/17 7:33 | 4/4/17 14:39 |
If you've added the datetime to the Axis, it may be defaulting to a default date hierarchy. Try the setup in this screenshot as a starting point, and after adding the datetime field, click on the arrow and select the time value from the menu.
Thanks deldersveld,
I can produce your results above, the key issue is the 'running sum' of the number of employees on site rather than simply graphing the time they clock on.
In your example below, at 7:30 i should be showing 9 staff on site, sorry if that wasn't clear in the first post.
I am expecting the result to look a lot like a bell curve.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!