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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

syntax error occurred during parsing: Invalid token, Line 1, Offset 44, ‘.

Hi, 

 

Please can someone supply me with some assistnace with an error. See below: 

 

DAX Meausure: 

 

LY Sales = CALCULATE([Total Sales],SAMEPERIODLASTYEAR(‘Date’[Date]))
 
Error that coming up is:
 
The following syntax error occurred during parsing: Invalid token, Line 1, Offset 44, ‘.
 

Stuck and cant progress to the next step in LAb2.

 

Thanks. 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , This seems correct. Open edit Query/Data Transformation. I am hoping you see some errors there. Try to correct those

View solution in original post

v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Ignore the syntax errors in your formula, you should use ' instead of ‘.

This should be right formula.

LY Sales = CALCULATE(SUM('Table'[Total Sales]),SAMEPERIODLASTYEAR('Date'[Date]))

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Ignore the syntax errors in your formula, you should use ' instead of ‘.

This should be right formula.

LY Sales = CALCULATE(SUM('Table'[Total Sales]),SAMEPERIODLASTYEAR('Date'[Date]))

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@Anonymous , This seems correct. Open edit Query/Data Transformation. I am hoping you see some errors there. Try to correct those

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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