dbTalk Databases Forums  

display totals using MDX

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


Discuss display totals using MDX in the microsoft.public.sqlserver.olap forum.



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

Default display totals using MDX - 02-06-2004 , 05:36 AM






I created an MDX statement which will display this data
-----------------------------------------------------------------------------------------------------------------------
Five Hand Pack Four Hand Pack
-----------------------------------------------------------------------------------------------------------------------
Vacuum Pack | PolyPack | Vacuum Pack | PolyPack
-----------------------------------------------------------------------------------------------------------------------
ABC566rr |ATC | 3,780 | 12,378 | 11,888 | 34,55
---------------------------------------------------------------------------------------------------------
Quote:
DD_PH | 630 | 20,000 | 45,999 | 4555
----------------------------------------------------------------------------------------------------------------------

However, I would need to display also the VacuumPack total, the Polypack total and the Overall total. This should be displayed at that the end of the table, like this

---------------------------------------------------------------------------------------------------------------------------------------------------------
Five Hand Pack Four Hand Pack
--------------------------------------------------------------------------------------------------------- | VP Total | PP total | Gran
Vacuum Pack | PolyPack | Vacuum Pack | PolyPack
---------------------------------------------------------------------------------------------------------------------------------------------------------
ABC566rr |ATC | 3,780 | 12,378 | 11,888 | 34,555 | 1234567 |65432 | 65434421
-------------------------------------------------------------------------------------------------------------------------------------------
Quote:
DD_PH | 630 | 20,000 | 45,999 | 45555 | 1234567 |65432 | 65434421
---------------------------------------------------------------------------------------------------------------------------------------------------------

However, I don't know how I would create an MDX statement that will output this result set. The MDX statement is this

SELECT {FILTER(CROSSJOIN([HAND CLASS].[Hands Name].MEMBERS,[DISTRIBUTION TYPE].[Plastic Type Name].MEMBERs), [Measures].[Qty Box Received] > 0 ) } on columns

{ Filter(CROSSJOIN({ [PACKING HOUSE].[Packing House Name].MEMBERs}, {[BRAND].[Brand Name].members}), [Measures].[Qty Box Received] > 0 ) } on Rows

FROM Pallets WHERE ([Measures].[Qty Box Received],[MARKET].[All MARKET].[Middle East],[VOYAGES].[All VOYAGES].[Al Zohal].[03-01])

How do I add the Mdx statement that will output the totals? Please help.
Any help will be much appreciated
Thanks very much in advance

Maye





Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: display totals using MDX - 02-06-2004 , 06:26 AM






Yo can add additional sets to the columns expression, such as

{FILTER(CROSSJOIN([HAND CLASS].[Hands Name].MEMBERS,[DISTRIBUTION TYPE].[Plastic Type Name].MEMBERs), [Measures].[Qty Box Received] > 0 ), crossjoin([Hands Class].[All Hands],[DISTRIBUTION TYPE].[Plastic Type Name].MEMBERs) } on column

HTH
Bria
www.geocities.com/brianaltmann/olap.html

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.