Hi,
I've got the problem with MDX. The thing is that I would like to create the dynamic dimension after the & character.
For example, the below statement works fine with month(now()) function:
SELECT ([Measures].[Ex Rate SEK/NOK CT]) ON 0
FROM [Datavarehus Choice]
WHERE
strtomember("[Exchange Rate Type].[Exchange Rate Type].&[Forcast Q" + CSTR(MONTH(NOW()))
+ " " + CSTR(YEAR(NOW())) + "]")
However, when I try to put the dimension after & like:
SELECT
([Measures].[Ex Rate SEK/NOK CT]) ON 0
FROM [Datavarehus Choice]
WHERE
strtomember("[Exchange Rate Type].[Exchange Rate Type].&[Forcast Q" + CSTR(MONTH([Col Date H].[Col Dato].&[2013-01-11T00:00:00])) + " " + CSTR(YEAR(NOW())) + "]")
It doesn't work and I got the error below. If anyone can help on this, would be very much appreciated.
Execution of the managed stored procedure MONTH failed with the following error: Microsoft::AnalysisServices::AdomdServer::AdomdException.
Internal error: An external component returned an error (HRESULT = ).
The following system error occurred: Out of present range.