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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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