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, 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'
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |