[Mondrian] Total for hierarquie levels
Julian Hyde
jhyde at pentaho.com
Mon Sep 7 17:35:12 EDT 2009
There are a few examples in the test suite:
*
http://p4webhost.eigenbase.org:8080/open/mondrian/testsrc/main/mondrian/olap
/fun/FunctionTest.java
*
http://p4webhost.eigenbase.org:8080/open/mondrian/testsrc/main/mondrian/olap
/fun/VisualTotalsTest.java
Julian
_____
From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of Rui Gonçalves
Sent: Monday, September 07, 2009 7:57 AM
To: tom at wamonline.org.uk; Mondrian developer mailing list
Subject: Re: [Mondrian] Total for hierarquie levels
Hi,
Can't seem to be able to use VisualTotals. Can you provide a sample?
Thank's
Rui
On Mon, Sep 7, 2009 at 2:24 PM, <tom at wamonline.org.uk> wrote:
http://msdn.microsoft.com/en-us/library/ms145527.aspx
VisualTotals is probably what you are looking for.
Tom
On Mon 7/09/09 1:27 PM , Rui Gonçalves rui.pinho.goncalves at gmail.com sent:
Hi All,
Im relatively new to Mondrian and Jpivot .
I would like to have a calculated total for hierarquies and levels.
Example:
select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,
NON EMPTY Hierarchize(Union({[Product].[All Products]}, [Product].[All
Products].Children)) ON ROWS
from [SteelWheelsSales]
Output:
Blocked imageMeasures
Blocked imageProduct Blocked imageQuantity
All Products
105.331
Classic Cars
35.552
Motorcycles
12.708
Planes
11.860
Ships
8.499
Trains
2.818
Trucks and Buses
11.001
Vintage Cars
22.893
In this sample, the total for the product column is the same as the value
for [Product].[All Products]
If the user wishes to select only some of the "products" in the hierarquie:
For Example:
select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,
NON EMPTY {[Product].[All Products], [Product].[All Products].[Classic
Cars], [Product].[All Products].[Vintage Cars]} ON ROWS
from [SteelWheelsSales]
The Output is:
Blocked imageMeasures
Blocked imageProduct Blocked imageQuantity
All Products
105.331
Classic Cars
35.552
Vintage Cars
22.893
And the total for this column will be 58.445 (Classic Cars + Vintage Cars)
I would like to know if it's possible to create a calculated column (or some
other thing) that computes the total for whatever slices are selected by the
user in a hierarquie. Is it possible to do it using running totals? If so
could you advise how?
I need this total value to use it in some more calculations, like some
percentages and so on.
The really nice solution would be to have a way to tell Mondrian to
calculate a total for the (displayed values in a) [Dimension].[Hierarquie]
Thank's
Regards,
Rui
_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20090907/50cb9f6d/attachment.html
More information about the Mondrian
mailing list