Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Simple variable check

I am trying to check a variable in DAX Studio with the following syntax:   var YM = MAX('Calendar'[Date]) RETURN YM   Can't figure out why I get syntax error message. Thank you!
  • AlexisOlson's avatar
    AlexisOlson
    4 years ago

    Anonymous The reason for this is that DAX Studio expects to be evaluation queries that return tables rather than single values. So you need to use the EVALUATE syntax and wrap a single value in braces { } since that denotes a list (a table with a single column).