Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowHi All,
I am having one requirement where I need to get the time between two dates. Please find the below sample data. Where I have one column which is "Start Date".
Let's say we have 24 hours in a day and if we split those 24 hours by 4 hours then 24 hours will be divided 6 times. So in my requirement, for the first start date which is "1-09-2020 12:05:10Am" If I add 4 hours to this date and Time then it should show
"1-09-2020 04:05:10AM". Please find the below screen shot for the reference of ouput.
So here I want to calculate the difference between dates but before that I need to have After Adding 4 hours Column in my table . If I have that column then we can find the diffrence between the start date and The column which will get "after adding 4 hours".
Could anyone help me, How can I get the "After adding 4 hours column" ?
Best Regards,
Srihari
Solved! Go to Solution.
hi @Anonymous
Just add a new calculate column as below:
After Adding 4 hours = 'Table'[Start Date] + TIME(4,0,0)
Result:
Regards,
Lin
hi @Anonymous
Just add a new calculate column as below:
After Adding 4 hours = 'Table'[Start Date] + TIME(4,0,0)
Result:
Regards,
Lin
You can add the TIME function to add 4 hrs in either a calculated column or (recommended) in a measure like this one. Use this in a table visual with your start date column, replacing AddTime with your actual table name.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
102 | |
70 | |
68 | |
54 | |
41 |
User | Count |
---|---|
153 | |
83 | |
65 | |
62 | |
61 |