• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Column Name with slash

Kamo

Member
Hi,

I have just noticed that the slash in a column name sometimes causes problems, especially in the example in the attachment.
Is there another solution without having to change the column name?

Thank you in advance.
 

Attachments

  • ColumnName.xlsx
    19.4 KB · Views: 1
Sorry, I just tried replacing [D/C] with [DC] in the formula and it works

Code:
each if [D/C]="C" then [Amount]*-1 else [Amount] this one does not works

each if [DC]="C" then [Amount]*-1 else [Amount] this one works

Strange, for power query [D/C] = [DC]
Have a nice day
 
It should be [#"D/C"] since "/" is an operator. Not strange, but normal :)

Thank you Grah for this proposal which also works,
What I meant was that without renaming my column, [DC] in the formula also works

See the 2 queries "Solution #2" and "GraH - Guido solution" that I added in the attached file
 

Attachments

  • ColumnName.xlsx
    23.8 KB · Views: 0
What I meant was that without renaming my column, [DC] in the formula also works
Yes, that's strange indeed (I would not have expected it).
I wanted to say that [D/C] fails because of the "/". Also if you would have a column named "DC", you get into trouble. So it is best to use the one with # and double quotes. I always double click on the available column at the side when writing custom column formulas.
 
I wanted to say that [D/C] fails because of the "/". Also if you would have a column named "DC", you get into trouble. So it is best to use the one with # and double quotes. I always double click on the available column at the side when writing custom column formulas.

Thank you, yes, we understand each other ;)
 
Back
Top