![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
| SELECT [TimePeriod].[Year].Members ON COLUMNS, |
#2
| |||
| |||
|
| SELECT [TimePeriod].[Year].Members ON COLUMNS, |
#3
| |||
| |||
|
|
Oops - need to include the current state, via CrossJoin: SELECT [TimePeriod].[Year].Members ON COLUMNS, Generate([State].[State Code].Members, CrossJoin({[State].CurrentMember}, TOPCOUNT([Vendor].[Vendor Name].Members,10, [Measures].[Amount]))) ON ROWS FROM APData - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
| SELECT [TimePeriod].[Year].Members ON COLUMNS, |
#5
| |||
| |||
|
|
I need to return the top 10 vendors within each state on the row axis along with year on ther column axis. This query returns the top 10 vendors nationally: SELECT [TimePeriod].[Year].Members ON COLUMNS, TOPCOUNT({[Vendor].[Vendor Name].Members},10, [Measures].[Amount]) ON ROWS FROM APData This was my attempt to return the top 10 for each state, but fails with a syntax error. SELECT [TimePeriod].[Year].Members ON COLUMNS, [State].[State Code].Members, TOPCOUNT({[Vendor].[Vendor Name].Members},10, [Measures].[Amount]) ON ROWS FROM APData Any help would be greatly appreciated. Chris Busch cbusch (AT) blueprintdba (DOT) com |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Depends on the tools you have available - using SQL Server components, here's a couple of options: - You can run MDX like a SQL query with "flattened" results in a DTS package, if the destination already has columns created to receive the data (discussed in this NG) - A Reporting Services Table Report can be built from an MDX query, and rendered as an Excel or CSV file - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#8
| |||
| |||
|
| ... |
![]() |
| Thread Tools | |
| Display Modes | |
| |