Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have two calculated columns that return the count of jobs based on the booking datetime within a 24hour period.
1. JOBS BEFORE 12
=VAR Time1_ = HOUR(FF_Raw_Data[JOB_BOOKING_DATETIME])
VAR Date1_ = INT(FF_Raw_Data[JOB_BOOKING_DATETIME])
RETURN IF(Time1_ < 12, "Yes", "No")
2. JOBS AFTER 12
=VAR Time1_ = HOUR(FF_Raw_Data[JOB_BOOKING_DATETIME])
VAR Date1_ = INT(FF_Raw_Data[JOB_BOOKING_DATETIME])
RETURN IF(Time1_ > 12, "Yes", "No")
I need to edit the measures based on the actual time i.e. if booking datetime >=00:00 midnight and <12pm midday, return YES else NO.
if booking datetime >=12pm and <00:00 midnight, return YES else NO
Appreciate any help, thanks.
Solved! Go to Solution.
@Anonymous
Use below calcualted columns:
Jobs Before 12 =
VAR _HOUR = HOUR(FF_Raw_Data[JOB_BOOKING_DATETIME]) RETURN
IF( _HOUR >= 0 && _HOUR < 12, "YES","NO")
Jobs After 12 =
VAR _HOUR = HOUR(FF_Raw_Data[JOB_BOOKING_DATETIME]) RETURN
IF( _HOUR >= 12 && _HOUR <= 24, "YES","NO")
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
Use below calcualted columns:
Jobs Before 12 =
VAR _HOUR = HOUR(FF_Raw_Data[JOB_BOOKING_DATETIME]) RETURN
IF( _HOUR >= 0 && _HOUR < 12, "YES","NO")
Jobs After 12 =
VAR _HOUR = HOUR(FF_Raw_Data[JOB_BOOKING_DATETIME]) RETURN
IF( _HOUR >= 12 && _HOUR <= 24, "YES","NO")
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.