Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AllanBerces
Post Prodigy
Post Prodigy

IF Condition

Hi gooday can anyone correct my If condtion. What i need is if the week is already pass it should be equal to 0, so from Week 1 to 11 it should be zero and from Week 12 onward should be equal to my forecasthour

 

FORECAST = IF('Table'[FORECASTHOURS] >  WEEKNUM(TODAY()), 0, 'Table'[FORECASTHOURS])
 
Thank you
1 ACCEPTED SOLUTION
rohit1991
Super User
Super User

Hii @AllanBerces 

 

Your logic is slightly incorrect. You should compare the week column with the current week (WEEKNUM(TODAY())), not the forecast value.

FORECAST =
IF(
    'Table'[Week] < WEEKNUM(TODAY()),
    0,
    'Table'[FORECASTHOURS]
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

2 REPLIES 2
rohit1991
Super User
Super User

Hii @AllanBerces 

 

Your logic is slightly incorrect. You should compare the week column with the current week (WEEKNUM(TODAY())), not the forecast value.

FORECAST =
IF(
    'Table'[Week] < WEEKNUM(TODAY()),
    0,
    'Table'[FORECASTHOURS]
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hi @rohit1991 thnak you very much work as i need

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.