dbTalk Databases Forums  

Query Help

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


Discuss Query Help in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Abdul Nasir Khan
 
Posts: n/a

Default Query Help - 08-27-2003 , 02:51 AM






I am new to MDX and OLAP.

I need help in Hierarchical data view of a dimension.

Below are 2 MDX queries based upon in FoodMart 2000 Database
------------------
//MDX Query 1:
select
{[Measures].[Amount]} on columns,
Hierarchize( {[Time].members }) on rows
from budget
------------------
//MDX Query 2:
select
{[Measures].[Amount]} on columns,
{[Time].members } on rows
from budget
------------------
I want the output Year, Quarter and Month in Hierarchical form. How
can I get it?

By applying Query1, I am not getting Year, Quarter and Month in
Hierarchical form. Though I am using Hierarchize function !!!

Instead I get the result in straight listing.

My MDX Query2 is without Hierarchize function and it produces the same
output as MDX Query1.

What difference does Hierarchize function make then?

P.S. I am using viewer "Sample MDX Application" shipped with Analysis
Services

Thanks
Abdul Nasir Khan

Reply With Quote
  #2  
Old   
Matt Carroll [MS]
 
Posts: n/a

Default Re: Query Help - 08-29-2003 , 08:41 PM






You should be getting 1997, Q1, 1, 2, 3, Q2, 1, 2, 3, Q3, 1, 2, 3, Q4, 1, 2,
3, 1998, Q1, 1, 2, ... for both queries. This is the hierarchiezed order.
The hierachize function orders the members so that the parents always preced
the children, but they are still shown in a "flat" list in the MDX Sample
since they are all members of the same hierarchy. Both queries return the
same ordering because the member set is hierarchized by default.Some other
more advanced browsers might show indents to indicate the level depth of
members and I think is what you're looking for, but the query would be the
same.

Hope this helps,
- Matt Carroll
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Abdul Nasir Khan" <a.nasir (AT) ieee (DOT) org> wrote

Quote:
I am new to MDX and OLAP.

I need help in Hierarchical data view of a dimension.

Below are 2 MDX queries based upon in FoodMart 2000 Database
------------------
//MDX Query 1:
select
{[Measures].[Amount]} on columns,
Hierarchize( {[Time].members }) on rows
from budget
------------------
//MDX Query 2:
select
{[Measures].[Amount]} on columns,
{[Time].members } on rows
from budget
------------------
I want the output Year, Quarter and Month in Hierarchical form. How
can I get it?

By applying Query1, I am not getting Year, Quarter and Month in
Hierarchical form. Though I am using Hierarchize function !!!

Instead I get the result in straight listing.

My MDX Query2 is without Hierarchize function and it produces the same
output as MDX Query1.

What difference does Hierarchize function make then?

P.S. I am using viewer "Sample MDX Application" shipped with Analysis
Services

Thanks
Abdul Nasir Khan



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.