Forum Discussion
Unexpected expression COLUMN
- Anonymous1 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.
Syntax looks fine. Try writing the whole query and running. It could be Dax query view is given a false error by the query is executed
https://www.sqlbi.com/articles/introducing-define-column-in-dax-queries/
No matter what I put after DEFINE COLUMN, it still shows an error and will not run. I went and did it individually, but doing it in Dax Query mode does not work for me on the latest update.
- Anonymous1 year agoNot applicable
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.- Anonymous1 year agoNot applicable
Hi jmsny
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You.
Harshitha.
Community Support Team.
- Anonymous1 year agoNot applicable
Hi jmsny ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank You.
Harshitha.
Community Support Team.