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

For formulas, how does Power BI interpret a Slash in a character string - entered versus pasted?

As I built this question, I seemed to have found a bit of an answer but would appreciate your coaching re why this works...

 

In constructing an "If" statement, I copied and pasted the logical test's condition string "ASD/AS/NVLD..." and PBI responded with the following syntax error msg, and pop-up when I hovered over the "...ASD..." portion of the string:

SibShops Diag Grp 3.1a 2020-06-16 syntax error.jpg

 

Exploring a bit further, hovering over the  ".../NVLD..." characters, the system popped up with:

SibShops Diag Grp 3.2a 2020-06-16 syntax error.jpg

 

then, erasing the "NVLD" and entering "...AS" results in an attempt to help with a formula...

SibShops Diag Grp 3.4a 2020-06-16 syntax error.jpg

 

But, after pondering all of this, I re-entered the formula (rather than cut and paste) and it worked fine >> WHY?? 😉

SibShops Diag Grp 3.5a 2020-06-16 no syntax error.jpg

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@JDBOS , Have copied it from a text editor? Because I tried /end/ and D/AS/N and it worked for me.

 

In case you took from some editor which taken /N as enter or some other formatting there. I might have carried that to power bi, hence the error

View solution in original post

v-zhenbw-msft
Community Support
Community Support

Hi @JDBOS ,

 

We restore your issue, 

 

For1.jpg

 

It is worth noting that this error occurs only when we use the wrong double quotes.

So please use the straight double quotes, the text in the straight double quotes will be red and it will work fine.

 

For2.jpg

 

If you have any question, please kindly ask here and we will try to resolve it.

 

Best regards,

 

Community Support Team _ zhenbw

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

View solution in original post

4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @JDBOS ,

 

We restore your issue, 

 

For1.jpg

 

It is worth noting that this error occurs only when we use the wrong double quotes.

So please use the straight double quotes, the text in the straight double quotes will be red and it will work fine.

 

For2.jpg

 

If you have any question, please kindly ask here and we will try to resolve it.

 

Best regards,

 

Community Support Team _ zhenbw

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

So, the "curly quotes" vs "straight quotes" are creating the errors!  

And @amitchandak was right that it was the editor passing in the "curly quotes"

Also found this good article about "smart quotes" - https://support.microsoft.com/en-us/office/smart-quotes-in-word-702fc92e-b723-4e3d-b2cc-71dedaf2f343

Thanks for your help!!

amitchandak
Super User
Super User

@JDBOS , Have copied it from a text editor? Because I tried /end/ and D/AS/N and it worked for me.

 

In case you took from some editor which taken /N as enter or some other formatting there. I might have carried that to power bi, hence the error

@amitchandak I'll do some experimenting - these autism diagnosis combinations were drawn from several sources and pasted into an email, then copied into an Excel spreadsheet so plenty of places for special characters to have been picked up...

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.