This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi, I'm trying to add a column with a condition in it, here's the code:
if(
(Time.Hour([Date and hour]) < 22 and Time.Hour([Date and hour]) > 😎
then "Day"
else "Night")
But everything im getting is an error saying expecting token RightParen, what am I doing wrong? The problem seems to appear with 'then' operator.
Solved! Go to Solution.
if Time.Hour([Date and hour]) < 22 and Time.Hour([Date and hour]) > 8
then "Day"
else "Night"
if Time.Hour([Date and hour]) < 22 and Time.Hour([Date and hour]) > 8
then "Day"
else "Night"
Thanks works perfectly love it
Nope, still having the same problem, the window looks like this also the emote should be number '8'
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |