This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi folks,
I have a table with a column named Lead Creation Date that represents a Datetime. Format -> 13-12-2021 05:04:56 .
Now when Lead creation is less than 10:00:00 I want to replace the time 04:50:00 with 10:00:00 and if it is more than 18:00:00 it should also become 10:00:00.
The Lead Creation Date should look like 13-12-2021 10:00:00 now.
Basically, Time Range between 10 to 18 should remain the same and the rest should be replaced with 10:00:00.
It would be nice if someone can help me.
Thanks
Tiwari
Solved! Go to Solution.
Hi @sathish_kumar1 ,
How about this:
I used the following formular and changed the type of the new column to date/time afterwards:
TomsNewDateTimeColumn =
IF (
HOUR(Table[TomsDateTimeColumn]) < 10 || HOUR(Table[TomsDateTimeColumn]) > 18,
Table[TomsDateTimeColumn].[Date] & " " & TIME ( 10, 0, 0 ),
Table[TomsDateTimeColumn].[Date] & " " & TIME ( HOUR(Table[TomsDateTimeColumn]), MINUTE(Table[TomsDateTimeColumn]), SECOND(Table[TomsDateTimeColumn]) )
)
Does this solve your issue? 🙂
/Tom
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
Hi @sathish_kumar1 ,
How about this:
I used the following formular and changed the type of the new column to date/time afterwards:
TomsNewDateTimeColumn =
IF (
HOUR(Table[TomsDateTimeColumn]) < 10 || HOUR(Table[TomsDateTimeColumn]) > 18,
Table[TomsDateTimeColumn].[Date] & " " & TIME ( 10, 0, 0 ),
Table[TomsDateTimeColumn].[Date] & " " & TIME ( HOUR(Table[TomsDateTimeColumn]), MINUTE(Table[TomsDateTimeColumn]), SECOND(Table[TomsDateTimeColumn]) )
)
Does this solve your issue? 🙂
/Tom
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
Check out the May 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 |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 42 | |
| 42 | |
| 41 | |
| 21 | |
| 20 |