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



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

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



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

@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
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors