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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.