cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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 IX
Super User IX

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!!
Dashboard of My Blogs !! YouTube Channel !! 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 IX
Super User IX

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!!
Dashboard of My Blogs !! YouTube Channel !! 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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors