Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Works in SELECT section, but not in WITH

0 views
Skip to first unread message

John Lynn

unread,
Jan 8, 2005, 3:11:35 PM1/8/05
to
This is driving me batty:


Why would this work:

SELECT TopCount({[Products].[All Products].[Track]},10,Measures.Quantity) ON
COLUMNS,
{[OrderType].members} ON ROWS
FROM OrderItems

but this doesn't:

WITH MEMBER[Measures].[TT] AS 'TopCount({[Products].[All
Products].[Track]},10,Measures.Quantity)'
SELECT [Measures].[TT] ON COLUMNS,
{[OrderType].members} ON ROWS
FROM OrderItems


??

All I did was move it to the WITH section to create a calculate member. The
error that I get then is:

"Unable to open cellset"
"Formula error - cannot convert set to Expression - in a Top or Bottom
function"


Martin Mason

unread,
Jan 8, 2005, 10:27:43 PM1/8/05
to
TopCount returns a set. You need to use WITH SET not WITH MEMBER

WITH SET [Top Products] AS 'TopCount( ({[Products].[All
Products].[Track]},10,Measures.Quantity)'
> SELECT { [Top Products] ON COLUMNS,


> {[OrderType].members} ON ROWS
> FROM OrderItems

Martin

"John Lynn" <john...@mailcitynospam.com> wrote in message
news:Oa1eC5b9...@tk2msftngp13.phx.gbl...

0 new messages