Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi DAX Experts. I am working on my first report in Power BI and I am seriosly stucked in a something that for me should be an issue as I have aexperience as a software developer but with minimal DAX experiance. The problem is:
I have a dataset that have data for Drivers which have the following fields:
In report I need to have a line chart that on X-axis have hours of the day (from 0 to 23) and on Y-axis I need to have number of drivers that is on duty (on hourly basis). X axis should display each hour even the count of drivers is 0.
Any helps will be much appreciated
Thanks a lot
Solved! Go to Solution.
Hi @dimidi ,
Here are the steps you can follow:
1. Select [Shift_Start] and [Shift_End] - Duplicate Column..
2. Select each of the two copied columns - Time - Time Only.
3. Create calculated table.
Time =
VAR __StartTime= TIME(0,0,0)
var __EndTime= TIME(23,0,0)
var __Duration= TIME(1,0,0)
return
GENERATESERIES(__StartTime,__EndTime,__Duration)
4. Create measure.
Time =
VAR __StartTime= TIME(0,0,0)
var __EndTime= TIME(23,0,0)
var __Duration= TIME(1,0,0)
return
GENERATESERIES(__StartTime,__EndTime,__Duration)
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @dimidi ,
Here are the steps you can follow:
1. Select [Shift_Start] and [Shift_End] - Duplicate Column..
2. Select each of the two copied columns - Time - Time Only.
3. Create calculated table.
Time =
VAR __StartTime= TIME(0,0,0)
var __EndTime= TIME(23,0,0)
var __Duration= TIME(1,0,0)
return
GENERATESERIES(__StartTime,__EndTime,__Duration)
4. Create measure.
Time =
VAR __StartTime= TIME(0,0,0)
var __EndTime= TIME(23,0,0)
var __Duration= TIME(1,0,0)
return
GENERATESERIES(__StartTime,__EndTime,__Duration)
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous,
Thank you very much for your help. This is exactly what I need to achieve.
Many thanks again,
Dimitar
So here is the sample of my dataset
| Driver | Date | Shift_Start | Shift_End |
| John Smith | 13/09/2023 | 13/09/2023 05:30:00 | 13/09/2023 13:00:00 |
| Paul Jones | 13/09/2023 | 13/09/2023 07:00:00 | 13/09/2023 19:00:00 |
| Tom Young | 13/09/2023 | 13/09/2023 12:00:00 | 13/09/2023 20:00:00 |
| Lee Bennett | 13/09/2023 | 13/09/2023 09:00:00 | 13/09/2023 17:00:00 |
| Lee Bennett | 14/09/2023 | 14/09/2023 09:00:00 | 13/09/2023 17:00:00 |
| Stewart Anderson | 13/09/2023 | 13/09/2023 19:00:00 | 14/09/2023 07:00:00 |
and this is the result that I need:
I am really sorry but I can't get this message. For me is absolutely no sense
You've not given enough info to allow us to help you. We have no idea what your data looks like, have no sample data, and have no mock up of your goal.
How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks for explaining
How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingDon't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 15 | |
| 10 | |
| 10 | |
| 8 | |
| 7 |
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 35 | |
| 29 | |
| 20 |