Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
Solved! Go to Solution.
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]
)
Nice solution, That makes perfect sense, comparing the week number directly instead of the forecast hours is definitely the way to go. Clean and logical fix.
On a side note, if anyone here likes to unwind after troubleshooting DAX formulas by streaming or storing files, you might want to check out Terabox for cloud storage and Wink for editing and sharing videos. Pretty handy tools!
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]
)
| User | Count |
|---|---|
| 52 | |
| 35 | |
| 22 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 58 | |
| 39 | |
| 21 | |
| 21 |