Forum Discussion
aliahad
1 year agoFrequent Visitor
Trying to get Max value using a column parameter
I have a table where I have added a column with an IF statment RowNumberYear = IF(VALUE(MAX('gt EMPLOYEE'[YEAR])) = VALUE('Head Count'[YEAR]), 1, 0) I am trying to get Max value using following...
maruthisp
Super User
1 year agoHi aliahad,
The error you're encountering in Power BI DAX, is due to the fact that you're trying to use a table variable (FilteredTable) directly inside a scalar function like MAX(), which expects a column reference from a base table, not a variable.
Please try below DAX expression:
RowNumber =
CALCULATE(
MAX('Head Count'[MONTH]),
'Head Count'[RowNumberYear] = 1
)
Hope the above DAX expression may help you.
Please let me know if you have further questions.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi