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
I have a table that pulls date, time and value. I want to create a column that puts the date IF(time is between 7:00 a.m. and 7:00 pm. on the same day && time is between 7:00 p.m. (on the same day) and 7:00 a.m on next day, same day DATE, same day DATE -1. The snippet below provides what the end result should be.
Solved! Go to Solution.
hi @cchp07
Try this. You might have to convert the resulting column to date type
EndResult =
VAR CutOffTime_ = ( 1 / 24 ) * 7 // 7 AM
RETURN
IF (
Table1[Time] - Table1[Date] >= CutOffTime_,
Table1[Date],
Table1[Date] - 1
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
hi @cchp07
Try this. You might have to convert the resulting column to date type
EndResult =
VAR CutOffTime_ = ( 1 / 24 ) * 7 // 7 AM
RETURN
IF (
Table1[Time] - Table1[Date] >= CutOffTime_,
Table1[Date],
Table1[Date] - 1
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
Don'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 |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |