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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
h11
Helper I
Helper I

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

@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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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