Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
Solved! Go to Solution.
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
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.
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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
73 | |
56 | |
38 | |
31 |
User | Count |
---|---|
84 | |
63 | |
63 | |
49 | |
45 |