Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
konradjonsson
Helper II
Helper II

The syntax for ')' is incorrect - what am I missing?

Hi.

I have seen similar posts on this topic. I need help with my formula. When I try to save it, it gives the error message "The syntax for ')' is incorrect".

 

TBF =
VAR First_Date =
CALCULATE ( MIN ( RPT_Warranty_and_Sold_Serial_Numbers[Service_Date] ); ALLEXCEPT ( RPT_Warranty_and_Sold_Serial_Numbers; RPT_Warranty_and_Sold_Serial_Numbers[Serial_Number] ) )
VAR FirstValue =
CALCULATE (
SUM ( RPT_Warranty_and_Sold_Serial_Numbers[Replacement_Day] );
ALLEXCEPT ( RPT_Warranty_and_Sold_Serial_Numbers; RPT_Warranty_and_Sold_Serial_Numbers[Serial_Number] );
RPT_Warranty_and_Sold_Serial_Numbers[Service_Date] = First_Date
)
VAR Second_Date =
CALCULATE ( MAX ( RPT_Warranty_and_Sold_Serial_Numbers[Service_Date] ); ALLEXCEPT ( RPT_Warranty_and_Sold_Serial_Numbers; RPT_Warranty_and_Sold_Serial_Numbers[Serial_Number]) )
VAR SecondValue =
CALCULATE (
SUM ( RPT_Warranty_and_Sold_Serial_Numbers[Replacement_Day] );
ALLEXCEPT ( RPT_Warranty_and_Sold_Serial_Numbers; RPT_Warranty_and_Sold_Serial_Numbers[Serial_Number] );
RPT_Warranty_and_Sold_Serial_Numbers[Service_Date] = Second_Date
)
RETURN
1 REPLY 1
Anonymous
Not applicable

Your variable defnitions seem to be fine (I only checked for parentheses), but there is no value to be returned after the RETURN keyword. That might cause the error, although in this case the error message would be misleading.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors