Forum Discussion

jmsny's avatar
jmsny
Frequent Visitor
1 year ago
Solved

Unexpected expression COLUMN

Creating a column is taking hours, so I wanted to use DAX query view to define it as I've done for measures in the past.  It should be possible according to Microsoft, but I'm instead getting an erro...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi jmsny,

     A column using DEFINE COLUMN in DAX Query View should work, but currently, Power BI doesn't support creating calculated columns through DAX Query View.

    This is why you're seeing the "unexcepted expression COLUMN" error, no matter what DAX expression you use.

    At the moment, only measures, variables, and evaluate statements are supported in DAX Query View.

    If you need to create a new column, the recommended approach is to:
      Go to the Data view or Model view,Select your table,Use the "New column" option to write your DAX expression.
    To create a column, please use the "New column" option in Data or Model view instead.

    If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.

     

    Best Regards,
    Harshitha.
    Community Support Team.