This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello all, I have the following data:
| 10/01/2019 | 23:51 | 01:20 |
| 30/02/2019 | 13:12 | 16:05 |
| 05/01/2019 | 22:40 | 03:20 |
| 08/02/2019 | 17:31 | 20:40 |
First column is data event, second is start time and thrid is end time. However, using a datediff function, it won't understand that the first line, for example, the start and end time are on different dates, and returns absurd numbers. Also, I don't have a date column referring to the third column, so I don't have 11/01/2019 in the example. Is there anyway to make this work?
Solved! Go to Solution.
@Anonymous
First of all, make sure the two columns are timestamp columns
Else use time function and make them time stamp
Start Time = Time(left([Strat],2),right([Strat],2)) // Do same with end
My suggestion would make them datetime with date , You can leave the date part if needed
New columns
Start date time = [Date]+[Start Time]
end Date time = if([Start Time] <[End Time ],[Date]+[EndTime],([Date]+[EndTime])+1)
Now you can use date diff
Diff = datediff([Start date time],[end Date time].day)
@Anonymous
First of all, make sure the two columns are timestamp columns
Else use time function and make them time stamp
Start Time = Time(left([Strat],2),right([Strat],2)) // Do same with end
My suggestion would make them datetime with date , You can leave the date part if needed
New columns
Start date time = [Date]+[Start Time]
end Date time = if([Start Time] <[End Time ],[Date]+[EndTime],([Date]+[EndTime])+1)
Now you can use date diff
Diff = datediff([Start date time],[end Date time].day)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 38 | |
| 29 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 66 | |
| 36 | |
| 30 | |
| 25 | |
| 24 |