0

We are using following MDX to create dynamic named set to generate future dates for one of our cube -

LASTPERIODS(100, STRTOMEMBER("[Calenar].[Calendar Date].&[" + 
CSTR(FORMAT(DATEADD("D",100,[Forecast].[Date Recorded].CURRENTMEMBER.MEMBERVALUE),
    "yyyy-MM-ddT00:00:00")) + 
"]"))

Above query expression executes successfully in MDX Query Analyzer. But after cube is processed successfully, we are facing issue while browsing the cube and getting following error:

  • Error occurred retrieving name set: Execution of the managed stored procedure DATEADD failed with following error 'Microsoft::AnalysisServices::AdomdServer::AdomdException
  • Internal Error : An external component returned an error (HRESULT = ).
  • The following system error occurred: Type Mismatch

Any help on this will be highly appreciated.

Referenced Link - MDX Named Set Rolling Date Range

Thanks,

Kinjal.

Kinjal
  • 21
  • 2
  • 6

1 Answers1

0

Do you have any null or "non-date" values in the [Forecast].[Date Recorded] members? Does this work when you run it as an MDX query on your cube?

Meff
  • 5,889
  • 27
  • 36
  • We have non-date values in members of [Forecast].[Date Recorded] dimension but we convert them to valid date formats. – Kinjal Jan 04 '13 at 05:27
  • @Kinjal what is the data type of [Forecast].[Date Recorded].CURRENTMEMBER, I wonder if you are having a d/m/y m/d/y issue with datetimes? That could work in QA but not connection, due to different default language? – Meff Jan 04 '13 at 14:24