Forum Discussion
I"m issue with power bi dax code with error cannot find name
- 10 months ago
Hii NYCDOT
The error occurs because WeekdayNumber is a virtual column created by SELECTCOLUMNS() and exists only in row context. Inside CALCULATE(), filters are evaluated in filter context, so the column cannot be resolved by name. The fix is to store [WeekdayNumber] in a variable and use that variable inside CALCULATE().
Thank you for replying. I'm actually having problem with the WeekdayNumber Column. I'm getting an error message state: Column 'WeekdayNumber' cannot be found or may not be used in this expression.
Hii NYCDOT
The error occurs because WeekdayNumber is a virtual column created by SELECTCOLUMNS() and exists only in row context. Inside CALCULATE(), filters are evaluated in filter context, so the column cannot be resolved by name. The fix is to store [WeekdayNumber] in a variable and use that variable inside CALCULATE().