MDX x Reporting Services: Month order incorrect when using Cube data

  • Hi there,

    I created a very simple report using SSAS [Adventure Works DW 2008R2] and SSRS, to show order_count by date. Report builder generated the MDX below:

    SELECT NON EMPTY { [Measures].[Order Count] } ON COLUMNS,

    NON EMPTY { ([Date].[Calendar].[Date].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS

    FROM [Adventure Works] CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

    The problem is that the report lists months alphabetically, rather than chronologically.

    When I run the same MDX in SSMS, the order is correct.

    Does anybody know how to fix the order in Report Builder?

    Thanks,

    Lj

  • Assuming you are using a matrix to layout the data in your SSRS report, you can add an entry in the row group sorting tab with the following expression:

    =CDate(Fields!Date.Value)

    ...if you try to add the entry to the tablix sorting tab, it won't work.

  • Thank you iPolvo. That worked.

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

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