I've used the following format in the past to get a variable in excel passed into an MDX statement successfully.
Code: Select all
{TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [Dimension1] )}, 0)}, ASC)} ,
[CC_Config].([Version].[&CHAR(34)&$F$15&CHAR(34)&],[CC].[HQ],[}ElementAttributes_Dimension1].[Currency])='USD'
) }"
Code: Select all
So in the above example lets say I'm not hardcoding 'USD' into the MDX statement, I'd like to lookup the currency from cell G15 in the workbook.
I need the single inverted commas on either side of the currency. The workbook reference has the currency without the single inverted comma - CHAR(39).
How would I substitute the 'USD' in the MDX above with an excel cell reference and also have single inverted commas inserted before and after the cell reference - to achieve 'USD' (when the workbook cell reference is simply USD)?
I've tried:
Code: Select all
{TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [Dimension1] )}, 0)}, ASC)} ,
[CC_Config].([Version].[&CHAR(34)&$F$15&CHAR(34)&],[CC].[HQ],[}ElementAttributes_Dimension1].[Currency])=&CHAR(39)&$G$15&CHAR(39)&
) }"
Code: Select all