0
votes

The string is stored in a parameter.
Say, @FiscalPeriod = "[Date].[Fiscal Dates].[Fiscal Quarter]"

Now,
I need to use the parameter as

SELECT Measures.[Revenue] ON 0,
CLOSINGPERIOD("Parameter Here") ON 1
FROM [Sales]

STRTOMEBER function gives error because it is looking for a member at the leaf left such as
[Date].[Fiscal Dates].[Fiscal Quarter].&[Q1 - 2009]

How can I resolve the string into the mdx expression to use it with closing period??

1
Was the question too trivial? or incomplete? or difficult to understand?excel_newbie

1 Answers

0
votes

The following should work:

SELECT Measures.[Revenue] ON 0,
STRTOMEMBER("CLOSINGPERIOD(" + @FiscalPeriod + ")") ON 1
FROM [Sales]