[Mondrian] Total for hierarquie levels

tom at wamonline.org.uk tom at wamonline.org.uk
Mon Sep 7 09:24:28 EDT 2009


  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }
 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, 
	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: 
  strtoupper("		Measures
")
 strtoupper("		Product
") strtoupper("		Quantity
") 
 strtoupper("		 All Products
") 		105.331
 strtoupper("		 Classic Cars
") 		35.552
 strtoupper("		 Motorcycles
") 		12.708
 strtoupper("		 Planes
") 		11.860
 strtoupper("		 Ships
") 		8.499
 strtoupper("		 Trains
") 		2.818
 strtoupper("		 Trucks and Buses
") 		11.001
 strtoupper("		 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:
  strtoupper("		Measures
")
 strtoupper("		Product
") strtoupper("		Quantity
") 
 strtoupper("		 All Products
") 		105.331
 strtoupper("		 Classic Cars
") 		35.552
 strtoupper("		 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/7c057934/attachment.html 


More information about the Mondrian mailing list