Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi everyone.
I'm working on a new measure for current year sales. I received the following error:
The syntax for 'RETURN' is incorrect. (DAX(Var CY = MAX('Date Dim'[Year]RETURNCALCULATE(SUM(Actuals[Sales Amount],'Date Dim'[Year]=CY))).
Here is my formula:
Line 1 CY Sales =
Line 2 Var CY = MAX('Date Dim'[Year]
Line 3
Line 4 RETURN
Line 5 CALCULATE(SUM(Actuals[Sales Amount],'Date Dim'[Year]=CY)
Line 6
I'm not sure why I received this error message.
Solved! Go to Solution.
@arneshabobo try this, You missed the closing Parenthesis in VAR CY
CY Sales =
Var CY = MAX('Date Dim'[Year])
RETURN
CALCULATE(SUM(Actuals[Sales Amount]),'Date Dim'[Year]=CY)
@arneshabobo try this, You missed the closing Parenthesis in VAR CY
CY Sales =
Var CY = MAX('Date Dim'[Year])
RETURN
CALCULATE(SUM(Actuals[Sales Amount]),'Date Dim'[Year]=CY)
Hi! Thank you for responding. I added the parenthesis but now the error says " too many arguments were passed to the SUM function. The maximum argument count for the function is 1."
HI @arneshabobo
You missed the closing paranthesis for the SUM function too, pls close it, it should work.
CALCULATE(SUM(Actuals[Sales Amount]) ,'Date Dim'[Year]=CY)
Thanks
Raj
Thanks so much for replying!
@arneshabobo edited again, try now.
That worked! Thanks so much for your swift response.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 86 | |
| 71 | |
| 38 | |
| 29 | |
| 26 |