Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am creating a new measure (Net_sales 2019), but as I am entering the DAX measure it shows red line under ''2019'' and returns an expression error. FY is a text column that is why I have entered 2019 as ''2019''.
=CALCULATE([Net_sales],dim_date[FY]=''2019'')
The expression is not valid or appears to be incomplete. Please review and correct the expression.
The syntax for '2019' is incorrect. (DAX(
CALCULATE([Net_sales],dim_date[FY]=''2019'')
)).
Solved! Go to Solution.
The error you're encountering is because you are using double quotes ('') to enclose the year '2019' within your DAX expression, which is causing a syntax error. In DAX, you should use single quotes (') to enclose text values. Here's the corrected expression:
=CALCULATE([Net_sales], dim_date[FY] = "2019")
In this corrected expression, '2019' is enclosed in double quotes, which is the correct way to specify a text value in DAX. Make sure your column [FY] in the dim_date table also contains '2019' as a text value for this expression to work correctly.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
The error you're encountering is because you are using double quotes ('') to enclose the year '2019' within your DAX expression, which is causing a syntax error. In DAX, you should use single quotes (') to enclose text values. Here's the corrected expression:
=CALCULATE([Net_sales], dim_date[FY] = "2019")
In this corrected expression, '2019' is enclosed in double quotes, which is the correct way to specify a text value in DAX. Make sure your column [FY] in the dim_date table also contains '2019' as a text value for this expression to work correctly.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
Thank you for the detailed answer and solution. It is working with this solution now. I got it fixed earlier with the help of ChatGPT, I copied the DAX syntax from there and it was the same syntax that I had written, and then pasted it in pivot measure and it worked.
However, then I deleted the measure and created it again, and again it was returning error despite the rught syntax, I again copied the syntax from ChatGPT and it worked. Don't know why it accepts the same copied DAX syntax from ChatGPT and returns the value and when I enter the DAX syntax while creating measure it returns error and shows red line under 2019 after entering single or double quotes.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |