Forum Discussion
az12
3 years agoNew Member
Time Comparison gives wrong answer
Hi, I'm trying to filter my data (telephone calls events) to only include calls that take place during work hours. Unfortunately the conditional statement I'm using returns the wrong answer from ...
- 3 years ago
az12 Can't replicate this. Try this though:
Call During Working Hours = IF( ('EVENT'[Local Start Time] - TRUNC('EVENT'[Local Start Time]) ) <= ('EVENT'[Working Day Closing Time] - TRUNC('EVENT'[Working Day Closing Time]) ),1,0)
bharath_v
3 years agoResolver I
hi az12
It works for me with same formula:
Work Hours? = IF(Appointments[Call Time] <= Appointments[Closing time], 1,0)
Hope the time columns have data type as "Time".
- Greg_Deckler3 years agoCommunity Champion
az12 bharath_v My thought here with the formula I provided is that perhaps one or both of the columns is actually a date/time value but being shown as just a time value format. Using TRUNC the way I demonstrated will get rid of the integer portion (# of days since December 30th, 1899) and then you will only be comparing the decimal portions (fraction of a day).