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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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