Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ciber2010
Starting Member
5 Posts |
Posted - 2011-01-28 : 06:44:01
|
| SELECT NON EMPTY { [Measures].[Record Count - Dim Employee AS] } ON COLUMNS, NON EMPTY { ([Date].[H_CalendarWeekHierarchy].[Calender Week].ALLMEMBERS * [Date].[Week ID].[Week ID].ALLMEMBERS * [Date].[Month ID].[Month ID].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM [Cube_Employee] CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGSThe Sample Results of the above query are shown below with 2 rows but the requirement is to pick only one row which has the Maximum Week_ID irrespective of number of Week_ID’s availableCalenderYear CalenderWeek Week_ID Month_ID Record Count2011 4 1621 373 23322011 5 1622 373 2332Please Give any MDX Query to get the result based on the max Week_IDThanks in advance |
|
|
|
|
|