how to add field in MDX query

  • Hi guys,

    i am trying to add new column into my MDX query but it will not updated my data set.

    I am using this query into my report data set so i used expression now i want to add two more columns.

    Real query:

    ="SELECT NON EMPTY { [Measures].[% Test Runs by Test Status] } ON COLUMNS,

    NON EMPTY { ([d Date].[Month].[Month].ALLMEMBERS * [d Date].[Month Name].[Month Name].ALLMEMBERS * [d Release].[Project].[Project].ALLMEMBERS * [d Test Status].[Test Status Description].[Test Status Description].ALLMEMBERS ) }

    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

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

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

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

    FROM ( SELECT ( { [d Date].[Full Date].&["+ Format(Parameters!FromdDateFullDate.Value, "yyyy-MM-dd") +"T00:00:00] : [d Date].[Full Date].&["+ Format(Parameters!TodDateFullDate.Value, "yyyy-MM-dd") +"T00:00:00] } ) ON COLUMNS

    FROM [TestCube]))))

    WHERE ( IIF( STRTOSET(@dReleaseTestPhase, CONSTRAINED).Count = 1, STRTOSET(@dReleaseTestPhase, CONSTRAINED), [d Release].[Test Phase].currentmember ) ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS"

    Updated query:

    ="SELECT NON EMPTY { [Measures].[% Test Runs by Test Status] } ON COLUMNS,

    NON EMPTY { ([d Date].[Full date].[Full date].ALLMEMBERS * [d Date].[Month].[Month].ALLMEMBERS * [d Date].[Month Name].[Month Name].ALLMEMBERS * [d Release].[Project].[Project].ALLMEMBERS * [d Test Status].[Test Status Description].[Test Status Description].ALLMEMBERS ) }

    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

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

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

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

    FROM ( SELECT ( { [d Date].[Full Date].&["+ Format(Parameters!FromdDateFullDate.Value, "yyyy-MM-dd") +"T00:00:00] : [d Date].[Full Date].&["+ Format(Parameters!TodDateFullDate.Value, "yyyy-MM-dd") +"T00:00:00] } ) ON COLUMNS

    FROM [TestCube]))))

    WHERE ( IIF( STRTOSET(@dReleaseTestPhase, CONSTRAINED).Count = 1, STRTOSET(@dReleaseTestPhase, CONSTRAINED), [d Release].[Test Phase].currentmember ) ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS"

    thanks in advance

  • Hi,

    I saw you have got only 2 parameter in the query. Here are the steps I would follow to avoid confusion.

    Remove the "Parameter field" from the query so that the query designer in the dataset is enabled.

    Go to the query designer and drag/drop the fields you want and test it.

    Refresh the fields and check if the new field is available.

    Replace the parameter as it was before.

    Hope this helps.

    -Swaroop

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply