dbTalk Databases Forums  

Big FILTER problem PLEASE HELP ME

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Big FILTER problem PLEASE HELP ME in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Big FILTER problem PLEASE HELP ME - 05-02-2006 , 10:17 AM






Hi

I am trying to filter a set of measures based on those measure being
assigned to a dimension.


I am trying to filter this
{[Measures].[Cost],[Measures].[Actual Cost]}

when this
{[Resource].[All Resource].[Capital Risk Cost]}, {[Resource].[All
Resource].[Capital Standard Cost],[Resource].[All Resource].[Capital
Standard Cost],
[Resource].[All Resource].[Revenue Risk
Cost],[Resource].[All Resource].[Revenue Standard Cost]}


I have played about will lots of syntax and cannot get anything to
work.

The only thing i can do is a NONEMPTYCROSSJOIN and then setup loads of
extra field in sql reporting to be the totals.


I am asking too much of MDX or am i just doing it wrong?????


Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Big FILTER problem PLEASE HELP ME - 05-08-2006 , 07:58 AM






If you are using AS 2005 you can do this:

Quote:
SELECT
{[Measures].[Cost],[Measures].[Actual Cost]}
FROM <Cube>
WHERE {[Resource].[All Resource].[Capital Risk Cost], [Resource].[All
Resource].[Capital Standard Cost],[Resource].[All Resource].[Capital
Standard Cost], [Resource].[All Resource].[Revenue Risk Cost],
[Resource].[All Resource].[Revenue Standard Cost]}
Quote:
If you are using AS 2000 you cannot put a set in the where clause and
you would need to create an aggregated member to slice on.

Quote:
WITH
MEMBER [Resource].Slicer as 'AGGREGATE({[Resource].[All Resource].
[Capital Risk Cost], [Resource].[All
Resource].[Capital Standard Cost],[Resource].[All Resource].[Capital
Standard Cost], [Resource].[All Resource].[Revenue Risk Cost],
[Resource].[All Resource].[Revenue Standard Cost]}
)'
SELECT
{[Measures].[Cost],[Measures].[Actual Cost]}
FROM <Cube>
WHERE ([Resource].[Slicer])
Quote:

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <1146583037.752950.83930 (AT) v46g2000cwv (DOT) googlegroups.com>,
pbuzzby (AT) gmail (DOT) com says...
Quote:
Hi

I am trying to filter a set of measures based on those measure being
assigned to a dimension.


I am trying to filter this
{[Measures].[Cost],[Measures].[Actual Cost]}

when this
{[Resource].[All Resource].[Capital Risk Cost]}, {[Resource].[All
Resource].[Capital Standard Cost],[Resource].[All Resource].[Capital
Standard Cost],
[Resource].[All Resource].[Revenue Risk
Cost],[Resource].[All Resource].[Revenue Standard Cost]}


I have played about will lots of syntax and cannot get anything to
work.

The only thing i can do is a NONEMPTYCROSSJOIN and then setup loads of
extra field in sql reporting to be the totals.


I am asking too much of MDX or am i just doing it wrong?????



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Big FILTER problem PLEASE HELP ME - 05-11-2006 , 02:58 AM



Thanks a lot i will give that a try.

I found a bodge way of doing it but your way makes sence now.

The more i read the more i wish i was using AS2005


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.