2

In a calculated dimension in Pivot Table, I would like to have special characters, in particular a single quote character inside a string in quotes. More precisely:

I would like to have in a calculated dimension a pick(match('Val1', 'Val2'),'Rep1','Rep2') where 'Rep1' is a string including a single quote, for instance 'Game O'Game'.

Is there an escape character for doing this, as the '\' character in Python ?

Please note I am working with calculated dimensions and not with the script.

George
  • 36,413
  • 9
  • 66
  • 103
kiriloff
  • 25,609
  • 37
  • 148
  • 229

2 Answers2

2

You can use an extra single qoute to escape:

'Game O''Game'

ralfbecher
  • 228
  • 1
  • 9
1

You can use the chr() function to achieve this. Passing the appropriate decimal code to the function will return that character. Concatenate this with the rest of your string and you have your result:

pick(match('Val1', 'Val2'), 'Game O' & chr(39) & 'Game', 'Rep2')
George
  • 36,413
  • 9
  • 66
  • 103