dbTalk Databases Forums  

percentual sales rates, dynamically

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss percentual sales rates, dynamically in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Siegfried Münch
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.