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
h11
Helper III
Helper III

The following syntax error occurred during parsing: Invalid token, Line 5, Offset 46,.

I'm getting an error on my power Bi when I'm trying to type a measure. The error is "The following syntax error occurred during parsing: Invalid token, Line 5, Offset 46,. Please help.

 

h11_0-1715177709743.png

 

Thank you!

1 ACCEPTED SOLUTION
Slim-
Frequent Visitor

@h11Offset 46 is the end of your last line, I even think that you have only 45 caracters in line 5 so I tried creating two tables with same columns as you and pasting your measure : I did not have any error.

 

Are you sure that you do not have a caracter hidden at the end of your line 5 or a sixth line below ?

View solution in original post

4 REPLIES 4
halfglassdarkly
Responsive Resident
Responsive Resident

Very hard to read your screenshot at that resolution.

h11
Helper III
Helper III

@Slim- Measure = VAR _SelectedValue = SELECTEDVALUE('Table 2'[Name])
VAR _Filtered = CALCULATE(DISTINCTCOUNT('Table'[Name]),FILTER('Table','Table'[Status] IN {"Approved", "In Progress"} && 'Table'[Name]=_SelectedValue))
VAR _All = CALCULATE(DISTINCTCOUNT('Table'[Name]))
RETURN
IF(ISBLANK (_SelectedValue), _All, _Filtered)
Slim-
Frequent Visitor

@h11Offset 46 is the end of your last line, I even think that you have only 45 caracters in line 5 so I tried creating two tables with same columns as you and pasting your measure : I did not have any error.

 

Are you sure that you do not have a caracter hidden at the end of your line 5 or a sixth line below ?

Slim-
Frequent Visitor

Hi @h11,

I cannot read the measure in the picture because of the quality,

 

Can you please paste your measure ?

 

Regards,

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.