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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.