dbTalk Databases Forums  

Totals and VisualTotals

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


Discuss Totals and VisualTotals in the microsoft.public.sqlserver.olap forum.



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

Default Totals and VisualTotals - 06-22-2004 , 06:32 AM






Our custom built client application is a collection of linked reports.
A user can open one report from another. When opening the next
report, we collect the information from the previous report and use
that to dynamically build the MDX for the next report. E.g.: a report
could consist of Divisions on rows and Products on columns. A next
report could then be the Clients on rows and Products on columns for
the clients of the Division that the user clicked on.

We use the information in the Axes objects returned by the Cellset
object(Cellset.Axes(Y_Axis).Positions.Members.Uniq ueName) to construct
the MDX. In some reports we use the VisualTotals function. The rows
that have re-calculated totals contain no metadata, so we cannot link
through to another report... The information like Key or UniqueName
seems totally lost.

Is there any way to set or retrieve the properties of substituted
totals ?
If not, is there a way to get both the totals and the visualtotals for
a filtered set ?

Thanks for all help!
Tom

Reply With Quote
  #2  
Old   
Tom VdP
 
Posts: n/a

Default RE: Totals and VisualTotals - 06-24-2004 , 03:03 AM







Sorry for bringing this topic back to the top, but we really could need some help...

How to get the following result:

A (visual total) 100
A 250
B (visual total) 150
B 750
C 10
D 80
E 30
E (visual total) 7
etc ...

Simplified MDX:

{ VisualTotals(
filter(
Descendants([DimClient].[All DimClient]),
[Measures].[totalsinrange]>0
),
, "* (visual total)") } on rows

Thanks!
Tom


"Tom VdP" wrote:

Quote:
Our custom built client application is a collection of linked reports.
A user can open one report from another. When opening the next
report, we collect the information from the previous report and use
that to dynamically build the MDX for the next report. E.g.: a report
could consist of Divisions on rows and Products on columns. A next
report could then be the Clients on rows and Products on columns for
the clients of the Division that the user clicked on.

We use the information in the Axes objects returned by the Cellset
object(Cellset.Axes(Y_Axis).Positions.Members.Uniq ueName) to construct
the MDX. In some reports we use the VisualTotals function. The rows
that have re-calculated totals contain no metadata, so we cannot link
through to another report... The information like Key or UniqueName
seems totally lost.

Is there any way to set or retrieve the properties of substituted
totals ?
If not, is there a way to get both the totals and the visualtotals for
a filtered set ?

Thanks for all help!
Tom


Reply With Quote
  #3  
Old   
Deepak Puri
 
Posts: n/a

Default RE: Totals and VisualTotals - 06-24-2004 , 09:37 PM



Here's a sample query for Foodmart Sales - it declares both the original
and visual sets for clarity/convenience:

Quote:
With Set [CustomerSet] as
'Filter(Descendants([Customers].[All Customers].[USA],
[Customers].[City],SELF_AND_BEFORE),
[Measures].[Store Sales] > 9000)'
Set [VisCustSet] as
'VisualTotals([CustomerSet], "* (visual total)")'

Select {[Measures].[Store Sales]} on columns,
Generate(VisCustSet, Union({Customers.CurrentMember},
{CustomerSet.Item(Rank(
Customers.CurrentMember, VisCustSet) - 1)})) on rows

from Sales
Quote:

- Deepak

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #4  
Old   
Deepak Puri
 
Posts: n/a

Default RE: Totals and VisualTotals - 06-25-2004 , 04:06 PM



Tom,

I've encountered many curious corporate policies; but not having a
standard "test bed" for MDX queries makes the sharing of findings even
more daunting! At any rate, pl. post your eventual MDX solution, as it
should be useful.


Thanks,
- Deepak

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

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.