Topcount within second level



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@xxxxxxxxxxxxxxxx

.


Loading