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

@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

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.

View solution in original post

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

@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

@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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors