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

More than one slices from same dimension in Where clause not working

0 views
Skip to first unread message

rupni...@gmail.com

unread,
Nov 17, 2009, 3:14:57 AM11/17/09
to rupni...@gmail.com
SELECT NON EMPTY {TopCount({Crossjoin({[Measures].[Average Sales
Amount]},{[Date].[Fiscal].[(All)].AllMembers})},20,[Measures].[Average
Sales Amount])} ON COLUMNS,
NON EMPTY {hierarchize(TopCount({[Geography].[Geography].
[(All)].AllMembers},20,[Measures].[Average Sales Amount]))} ON ROWS
FROM "Adventure Works"
WHERE ([Product].[Color].&[Black],[Product].[Color].&[Red])

Executing the query ...
The 'Color' hierarchy appears more than once in the tuple.
Execution complete

The issue is with using more than once slices from same dimension in
where clause e.g. ([Product].[Color].&[Black],[Product].[Color].&
[Red])

I have to use more than one slices from same dimension. But the MDX is
failing with error, please suggest how to acheive this?

Best Regards,
Rupesh

Zheng Xie

unread,
Nov 17, 2009, 11:20:51 PM11/17/09
to
In ([Product].[Color].&[Black],[Product].[Color].&[Red]), the () is a
tuple which needs members from different hierarchies.

If you only want to aggregate them, you can simply change ([Product].
[Color].&[Black],[Product].[Color].&[Red]) to be {[Product].[Color].&
[Black],[Product].[Color].&[Red]}.

rupni...@gmail.com

unread,
Nov 19, 2009, 3:30:38 AM11/19/09
to

Thanks a lot. It really helped!

Best Regards,
Rupesh

0 new messages