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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
Can someone help me? I have a table containing information on emails received. Date/Time etc. I need to create a column/measure on Power Bi where it will filter only to show emails received 'After Hours' Between 5pm and 9am. This must also include weekends and Public Holidays.
Solved! Go to Solution.
@lennox25 Try:
Column =
VAR __DateTime = [DateTimeColumn]
VAR __Hour = HOUR(__DateTime)
VAR __Result = IF( __Hour >= 17 || __Hour < 9 || WEEKDAY(__DateTime,2) > 5,1,0)
RETURN
__Result
@lennox25 Try:
Column =
VAR __DateTime = [DateTimeColumn]
VAR __Hour = HOUR(__DateTime)
VAR __Result = IF( __Hour >= 17 || __Hour < 9 || WEEKDAY(__DateTime,2) > 5,1,0)
RETURN
__Result
@Greg_Deckler Is it possible to add to this by including Public Holidays? Thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |