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
ljkeefe
Helper I
Helper I

Error message: The syntax for ')' is incorrect.

I'm following this tutorial step-by-step and I get the syntax error: https://www.youtube.com/watch?v=cdUg8LfarCg&lc=UgxiYG9l4FEGSPPCHIZ4AaABAg.9ojUaHLyeGS9ol4f4SkqIS

 

Here's my code: 

 

 

PaddingLeft = 
VAR OverallStartDate1 = [OverallStartDate]
VAR StartDate =  
    CALCULATE ( 
        MIN ('Required Messaging Schedules'[Project Start Date]),
     REMOVEFILTERS (DateTable)
    )
VAR Result = 
    INT(StartDate - OverallStartDate1)
RETURN

 

 

I'm at a loss. I've rewatched the video three times. 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

You need to tell it what to return.

 

PaddingLeft = 
VAR OverallStartDate1 = [OverallStartDate]
VAR StartDate =  
    CALCULATE ( 
        MIN ('Required Messaging Schedules'[Project Start Date]),
     REMOVEFILTERS (DateTable)
    )
VAR Result = 
    INT(StartDate - OverallStartDate1)
RETURN
    Result

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

You are returning your variable so if you had called your variable 'MyResult' instead of Result you would 


Return
MyResult

 

Glad you got it working.

jdbuchanan71
Super User
Super User

You need to tell it what to return.

 

PaddingLeft = 
VAR OverallStartDate1 = [OverallStartDate]
VAR StartDate =  
    CALCULATE ( 
        MIN ('Required Messaging Schedules'[Project Start Date]),
     REMOVEFILTERS (DateTable)
    )
VAR Result = 
    INT(StartDate - OverallStartDate1)
RETURN
    Result

Oh my god...I came across a post that said to use Return_result and that didn't work. But I just tried your suggestion and BAM! Thank you!

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.