Forum Discussion
konradjonsson
Helper II
6 years agoThe 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
- AnonymousNot 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.