dbTalk Databases Forums  

Analysis Services Calculation HELP (Using 2 measures in 1 calculation)

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


Discuss Analysis Services Calculation HELP (Using 2 measures in 1 calculation) in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
daveoram24@hotmail.com
 
Posts: n/a

Default Analysis Services Calculation HELP (Using 2 measures in 1 calculation) - 11-17-2006 , 09:49 AM






Hey all,

I am having a problem calculating something. My formula is (Present
Market Value)-(Previous Market Value)-(Capital Added)
I am able to get the Present-Previous Market Value by this:

Create Member CurrentCube.[Snapshot].[MonthDate Snapshot Calculations].
[Market Change] AS "NA";
Scope(
{
[Measures].[Market Value - Combined Valuation]
}
);

( [Snapshot].[MonthDate Snapshot Calculations].[Market Change],
[Snapshot].[MonthDate].[MonthDate].Members ( 1 ) : Null ) =

( [Snapshot].[MonthDate Snapshot Calculations].DefaultMember ) -
( [Snapshot].[MonthDate Snapshot Calculations].DefaultMember,
ParallelPeriod(
[Snapshot].[MonthDate].[MonthDate],
1,
[Snapshot].[MonthDate].CurrentMember
)
);

( [Snapshot].[MonthDate Snapshot Calculations].[Market Change],
[Snapshot].[MonthDate].[MonthDate].Members ( 0 ) ) = Null;

End Scope;

Now all i have to do is subtract the Capital Added. I have the capital
in a column and have been able to calculate the capital added
separately from this calculation by:

Create Member CurrentCube.[Snapshot].[MonthDate Snapshot Calculations].
[Capital Added] AS "NA";
Scope(
{
[Measures].[Capital]
}
);

( [Snapshot].[MonthDate Snapshot Calculations].[Capital Added],
[Snapshot].[MonthDate].[MonthDate].Members ( 1 ) : Null ) =

( [Snapshot].[MonthDate Snapshot Calculations].DefaultMember ) -
( [Snapshot].[MonthDate Snapshot Calculations].DefaultMember,
ParallelPeriod(
[Snapshot].[MonthDate].[MonthDate],
1,
[Snapshot].[MonthDate].CurrentMember
)
);

( [Snapshot].[MonthDate Snapshot Calculations].[Capital Added],
[Snapshot].[MonthDate].[MonthDate].Members ( 0 )
) = Null;

End Scope;

Now all i have to do is subtract the capital added from my
present-previous market value calculation but i am unable to do it for
some reason. I think its because they are from two different measures
but im not sure.
If anyone has any ideas, please let me know. And if any further
information would help, just let me know.

Thanks in advance


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.