Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Evaluating Variable within another Variable

I have a chart where the user selects the dimension from an input box. For dimensions that are more than one word, the dynamic chart doesn't work because I need brackets around the name:

Example:

If the user selects Target Line, I need to pass [Target Line].

I created a new variable using the code:

='[' & $(pivotDim1) & ']'

But this only returns [] without the selected dimension between brackets. My pivotDim1 variable works fine for reading the selected name, so this variable is not the problem. Any suggestions?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

='[' & pivotDim1 & ']'



edit:

or

='[' & '$(pivotDim1)' & ']'


View solution in original post

4 Replies
swuehl
MVP
MVP

Try

='[' & pivotDim1 & ']'



edit:

or

='[' & '$(pivotDim1)' & ']'


Anonymous
Not applicable
Author

Hi Andy,

try this instead for your calculated dimension:

= $(='['&only(pivotDim1)&']')

Let me know how it goes and if you need me to explain how it works

Boris

Not applicable
Author

The expression without the dollar sign worked!

Not applicable
Author

It didn't work, but I was able to fix it by removing the dollar sign.