Forum Discussion
dimidi
2 years agoRegular Visitor
HELP with DAX
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...
- Anonymous2 years ago
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
dimidi
2 years agoRegular Visitor
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: