dbTalk Databases Forums  

MDX Problem, please help.

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss MDX Problem, please help. in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
frankie lo
 
Posts: n/a

Default MDX Problem, please help. - 12-04-2006 , 10:07 PM






Dear All,
I want to create a report that sum ytd value by parameters (by year &
month). I set the @YearNum first and then below message return.
Do you know what is the problem?, I have tested in fews days. Please help &
many many thanks.


Quote:
Executing the query ...
Parser: The query contains the YearNum parameter, which is not declared.
Execution complete
Quote:
WITH
MEMBER [Measures].[YTD KGS] AS 'Sum(PeriodsToDate([Dim Time].[Month Full
Name].[Month Full Name]), [Measures].[KGS])'
MEMBER [Measures].[YTD Amount] AS 'Sum(PeriodsToDate([Dim Time].[Month Full
Name].[Month Full Name]), [Measures].[Amount])'

SELECT
NON EMPTY { [Measures].[YTD KGS] ,[Measures].[YTD Amount] } ON COLUMNS,

NON EMPTY { ([Dim Customer].[Customer Name].[Customer Name].ALLMEMBERS
* [Dim Time].[Calendar Year].[Calendar Year].ALLMEMBERS
* [Dim Time].[Month Full Name].[Month Full Name].ALLMEMBERS
* [Dim Cntr Mode].[Cntr Mode App].[Cntr Mode App].ALLMEMBERS ) }

DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

FROM ( SELECT ( STRTOSET (@YearNum, CONSTRAINED) ) ON COLUMNS

FROM [Customer Volume View])
where ([Dim Time].[Calendar Year].[Calendar Year], ( STRTOSET(@YearNum,
CONSTRAINED)))

CELL PROPERTIES VALUE,
BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME,
FONT_SIZE, FONT_FL




Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: MDX Problem, please help. - 12-05-2006 , 04:52 PM






Assuming that you're seeing this error in MDX Query Designer for
Reporting Services (with Analysis Services Provider), select the
"Parameters" tab of the "Dataset ..." dialog. Then if there is no row
with Parameter Name of "YearNum", add it and set its Parameter Value to
the corresponding report parameter value.

http://msdn2.microsoft.com/en-us/library/ms155824.aspx
Quote:
SQL Server 2005 Books Online

Using Analysis Services MDX Query Designer in Query Mode
...
To manage the relationship between report parameters and query
parameters, click the Edit Selected Dataset () button on the toolbar to
open the Dataset dialog box, and click the Parameters tab. Although
report parameters are created automatically from query parameters, you
can manage report parameters separately. Also, if you change the name of
a query parameter, or delete a query parameter, the report parameter
that corresponds to the query parameter is not automatically changed or
deleted. To remove a report parameter, from the Report menu, select
Report Parameters. Select the parameter you want to remove, and click
Remove. For more information, see Working with Parameters in Reporting
Services.


Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.