Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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'
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 8 | |
| 6 |