percentual sales rates, dynamically -
09-15-2004
, 07:56 AM
Hallo,
i'm working with the Analysis Server of SQL Server 2000.
I had created a sales cube within the Analysis Cube-Editor.
The sales cube displays sales and there percental rates (sales per
Colours).
[Farben].CurrentMember means the dimension [colours].CurrentMember.
Please look at my formula of the calculated member [sales_rate]:
iif(isempty(([Measures].[VK_VK_NE], Ancestor( [Farben].CurrentMember,
1))), 1, [Measures].[VK_VK_NE] / ([Measures].[VK_VK_NE],
Ancestor([Farben].CurrentMember, 1)))
This formula works fine, but only, if i display the colours-dimension.
If i change, within the cube-editor, the cube from sales per colours
to sales per ware-group (drag and drop in the SQL-Editor), my formula
must fail - i must change the formula to:
iif(isempty(([Measures].[VK_VK_NE], Ancestor(
[ware_group].CurrentMember, 1))), 1, [Measures].[VK_VK_NE] /
([Measures].[VK_VK_NE], Ancestor([ware_group].CurrentMember, 1)))
No, my question:
I want show the percentual rates for all selected dimensions. I'm
searching
for a formula, which is okay for all dimensions.
Is there a function, which returns the current selected dimension?
For example like this:
iif(isempty(([Measures].[VK_VK_NE], Ancestor(
currentDimension().CurrentMember, 1))), 1, [Measures].[VK_VK_NE] /
([Measures].[VK_VK_NE], Ancestor(currentDimension().CurrentMember,
1)))
or is the another way to realize my idea?
Thanks for all answers.
Siegi |