dbTalk Databases Forums  

hiding dimension if measurement has no value

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


Discuss hiding dimension if measurement has no value in the microsoft.public.sqlserver.olap forum.



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

Default hiding dimension if measurement has no value - 07-12-2004 , 06:55 PM






How can I hide a dimension while browsing the cube if the measurement value is nothing?

I see 'hide member if' property but i am not sure if this is what i am looking for or not. The 'only child with parent's name, etc.' is confusing.
thx


Reply With Quote
  #2  
Old   
AshVsAOD
 
Posts: n/a

Default Re: hiding dimension if measurement has no value - 07-12-2004 , 09:05 PM






Not sure if you want to hide a Dimension or a member of a Dimension. If it
is the latter here is some MDX that does it:

SELECT { [Measures].[Sales] } ON COLUMNS , NON EMPTY { { { [Products].[All
Products].CHILDREN } * { [EmployeeID].[All Employee ID].CHILDREN } } } ON
ROWS FROM [Cube1]



So you want to look at the NON EMPTY MDX statement...

An example of what this does is:

Before NON EMPTY

Product 1 500

Product 2

Product 3 1000

After NON EMPTY

Product 1 500

Product 3 1000

"dave" <dave (AT) discussions (DOT) microsoft.com> wrote

Quote:
How can I hide a dimension while browsing the cube if the measurement
value is nothing?

I see 'hide member if' property but i am not sure if this is what i am
looking for or not. The 'only child with parent's name, etc.' is confusing.
thx




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

Default Re: hiding dimension if measurement has no value - 07-12-2004 , 10:25 PM



Well, the dimension is usernames. If the user has a value of nothing in the measurements i do not want to display that username. How would i remove or hide this username if the measurement value is zero when browsing the cube?

thank you for your quick response.
dave

Reply With Quote
  #4  
Old   
AshVsAOD
 
Posts: n/a

Default Re: hiding dimension if measurement has no value - 07-12-2004 , 11:42 PM



It definitely sounds like NON EMPTY is the answer to your question...

Using FoodMart...

Run the following query:
SELECT { [Time].&[1997] } ON COLUMNS ,{ [Customers].[All
Customers].CHILDREN } ON ROWS FROM [Sales] WHERE ( [Measures].[Unit Sales] )



You will get Canada and Mexico listed with no Sales... And USA with X
amount...

Now run this query:

SELECT { [Time].&[1997] } ON COLUMNS ,NON EMPTY { [Customers].[All
Customers].CHILDREN } ON ROWS FROM [Sales] WHERE ( [Measures].[Unit Sales] )

You will get USA with X amount and no Canada or Mexico. Is this not what
you want?

"dave" <dave (AT) discussions (DOT) microsoft.com> wrote

Quote:
Well, the dimension is usernames. If the user has a value of nothing in
the measurements i do not want to display that username. How would i remove
or hide this username if the measurement value is zero when browsing the
cube?
Quote:
thank you for your quick response.
dave



Reply With Quote
  #5  
Old   
dave
 
Posts: n/a

Default Re: hiding dimension if measurement has no value - 07-13-2004 , 06:53 AM



To clarify, i am not directly using mdx expressions. I am using the excel interface or browsing the cube through analysis server. So, through either excel or analysis server how do i hide empt values?
thank you once again

Reply With Quote
  #6  
Old   
AshVsAOD
 
Posts: n/a

Default Re: hiding dimension if measurement has no value - 07-13-2004 , 08:35 PM



I am not sure how to do this through the Excel interface as I do not use it.
As for the AS browser... I don't think this is possible, unless you modify
your query to prevent members with zero.
For example:

Select * From Vw_Sales Where Sales NOT 0

Good luck, and I apologise that I couldn't assist further.
"dave" <dave (AT) discussions (DOT) microsoft.com> wrote

Quote:
To clarify, i am not directly using mdx expressions. I am using the excel
interface or browsing the cube through analysis server. So, through either
excel or analysis server how do i hide empt values?
Quote:
thank you once again



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.