My problem is that I need to use the ' sign in my formula. Since the entire formula needs to be put into a variable as text with ' sign, then the SET expression and If statement don´t work. I tried to use chr(39) in the SET expression and if statement, which works perfectly in a text box, but not when I´m using the variable input buttons.
Original expression that I want to use for sorting:
The first chr(39) seems to be interpreted as '. But as soon as I put in anything after the first chr(39), then the variable vPivotSort gets blank. For example 'sum({<Version={'&chr(39) works fine, but 'sum({<Version={'&chr(39)&'Actuals' gives me a blank variable.