Count of current selected members of a dimension in MDX -
06-23-2005
, 06:37 AM
Hello everybody,
I have a big problem and don't know a solution for that. I hope you
have ideas for solving my MDX-problem.
My system:
- MS-SQL 2000 + Analysis Server
- Pro Clarity Desktop Pro 6.0
I have a cube with YWD-Dimension, Product-Dimension and Orders as
Measure.
The Product-Dimension has 3 Levels.
The task is to build a calculated member with the following formula:
Percentage Order of a product among the current selected products in
ProClarity.
ProductOrder:
([Product].CurrenMember, [Measures].[Order])
Order% = ProductOrder / SelectedProductsOrderSum
How can I build the sum of orders of the all selected products?
Example:
We have the following situation of the selected products in the Product
dimension:
Product L0
[ ] Product L1a
[ ] Product L1a.1
[x] Product L1a.2
[ ] Product L1a.3
[ ] Product L1a.4
[ ] Product L1a.5
[ ] Product L1b
[x] Product L1b.1
[ ] Product L1b.2
[ ] Product L1b.3
[x] Product L1c
[ ] Product L1c.1
[x] Product L1c.2
Product | Order Qty | Order % of the whole
---------------|---------------------------------------
Product L1a.2 | 700 | 70 %
Product L1b.1 | 200 | 20 %
Product L1c.2 | 100 | 10 %
================================================== =====
SelectedProductsOrderSum = 1000 100 %
-------------------------------------------------------
What I want is a function like ([Product].Members, [Measures].[Order])
not for all the members of the Product-dimension just for the selected
members of the Product-dímension!
The second problem:
____________________
How can I get the number of the selected members in ProClarity with
MDX. For the example above the result should be 3 (for the 3 selected
members)!
Thanks alot in advance
kindly greetings
Otto |