Forum Discussion
lennox25
Post Patron
2 years agoHelp with Calculated Column which is not working as it should
Hi,
Can someone help please?
This calculated column is not working as it should for some reason its not picking up all the required times as it should. Where I have highlighed in yellow it should be picking up those times too
Out of Hours Emails Recd =
VAR __DateTime = [Date & Time]
VAR __Hour = HOUR('Mailbox'[Time])
VAR __Result = IF( __Hour >= 6 && __Hour <8 || __Hour >= 16 && __Hour <18|| __Hour >= 18 && __Hour <6|| WEEKDAY(__DateTime,2) > 5,1,0)
RETURN
__Result
3 Replies
- Ahmedx
Super User
pls try this
Out of Hours Emails Recd = VAR __DateTime = [Date & Time] VAR __Hour = HOUR('Mailbox'[Time]) VAR __Result = IF( __Hour >= 0 && __Hour <8 || __Hour >= 16 && __Hour <18|| __Hour >= 18 && __Hour <24|| WEEKDAY(__DateTime,2) > 5, 1,0) RETURN __Result- lennox25
Post Patron
Thank you for answering and providing a solution so quickly 🙂
- Ahmedx
Super User