[Mondrian] Total for hierarquie levels

Rui Gonçalves rui.pinho.goncalves at gmail.com
Mon Sep 7 08:27:26 EDT 2009


Hi All,



I’m relatively new to Mondrian and Jpivot .

I would like to have a calculated total for hierarquies and level’s.

Example:

select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,
  NON EMPTY Hierarchize(Union({[Product].[All Products]}, [Product].[All
Products].Children)) ON ROWS
from [SteelWheelsSales]


Output:

Measures Product Quantity  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:

Measures Product Quantity  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20090907/8642fa3c/attachment.html 


More information about the Mondrian mailing list