![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to get a "top 10 products by revenue, by state" kind of mdx, but the topcount doesn't seem to be run in the context of the current state, the products come back in the same order for each state in the crossjoin. Any ideas? Right now I have something allong the lines of WITH SET [Top 10 Products] AS 'TopCount([Product].MEMBERS,10,[Sales])' SELECT {Measures.Sales} ON COLUMNS, Crossjoin([Geography].[State].Members,[Top 10 Products]) ON ROWS FROM [Sales Cube] Thanks in advance again! Derrick |
#3
| |||
| |||
|
|
Named sets do not resolve in query context. If you do the TopN inline it will behave as expected. public @ the domain below www.tomchester.net "Derrick" <derrick1298 (AT) excite (DOT) com> wrote in message news:upC73A%23IEHA.2556 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I'm trying to get a "top 10 products by revenue, by state" kind of mdx, but the topcount doesn't seem to be run in the context of the current state, the products come back in the same order for each state in the crossjoin. Any ideas? Right now I have something allong the lines of WITH SET [Top 10 Products] AS 'TopCount([Product].MEMBERS,10,[Sales])' SELECT {Measures.Sales} ON COLUMNS, Crossjoin([Geography].[State].Members,[Top 10 Products]) ON ROWS FROM [Sales Cube] Thanks in advance again! Derrick |
#4
| |||
| |||
|
|
Tom, Thanks, don't see TopN in the SQL doc? Do you have a link to an example? Thanks again! Derrick "Tom Chester" <nospam_public (AT) tomchester (DOT) net> wrote in message news:tEVfc.288$_R.46073 (AT) news (DOT) uswest.net... Named sets do not resolve in query context. If you do the TopN inline it will behave as expected. public @ the domain below www.tomchester.net "Derrick" <derrick1298 (AT) excite (DOT) com> wrote in message news:upC73A%23IEHA.2556 (AT) TK2MSFTNGP12 (DOT) phx.gbl... I'm trying to get a "top 10 products by revenue, by state" kind of mdx, but the topcount doesn't seem to be run in the context of the current state, the products come back in the same order for each state in the crossjoin. Any ideas? Right now I have something allong the lines of WITH SET [Top 10 Products] AS 'TopCount([Product].MEMBERS,10,[Sales])' SELECT {Measures.Sales} ON COLUMNS, Crossjoin([Geography].[State].Members,[Top 10 Products]) ON ROWS FROM [Sales Cube] Thanks in advance again! Derrick |
![]() |
| Thread Tools | |
| Display Modes | |
| |