cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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

Accepted Solutions
Highlighted
Super User IV
Super User IV

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

@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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Community Support
Community Support

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

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
Highlighted
Super User IV
Super User IV

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

@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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

View solution in original post

Highlighted
Helper II
Helper II

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

@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...

Highlighted
Community Support
Community Support

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

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

Highlighted
Helper II
Helper II

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

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!!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors