dbTalk Databases Forums  

calculated member based on parameter

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


Discuss calculated member based on parameter in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sanjeev
 
Posts: n/a

Default calculated member based on parameter - 08-09-2005 , 09:13 AM






I have a time dimention and several other..

(Ror) Return of return on Investment
Jan 03 2.0%
Feb 03 1.5%
Mar 03 3.0%
..
..
..

Now my requirment is that user can select reporting period, Like Feb 03
to Sep 03. I need to calculate Index based on 100. so the result will
be

return Index
Feb 03 1.5 101.5 (100 + 100 * 1.5/100)
Mar 03 3.0 104.545 (101.5 + 101.5 * 3.0/100)
..
..
Sep 03 2.3 120.67 ....

This means Index starts from the month selected by the user at the time
of viewing the report.

I have achived this by creating a calculated member in MDX using with
set [TimeRange] as '{[Time].[All Year].[2003].[3]:[Time].[All
Year].[2003].[9] }'

MEMBER [Measures].[Index] as 'IIF ([time].currentmember IS
[timerange].Item(0),
100 + (100 *( [Measures].[ROR]))
,[time].prevmember + ([time].prevmember *( [Measures].[ROR])))'

Is there any way by which i can store this in Analysisserver.

Thanks,
Sanjeev


Reply With Quote
  #2  
Old   
SQL McOLAP
 
Posts: n/a

Default RE: calculated member based on parameter - 08-10-2005 , 08:12 AM






What do you mean by "store"? Do you want to store the result, or the
definition of the calculation itself?

"Sanjeev" wrote:

Quote:
I have a time dimention and several other..

(Ror) Return of return on Investment
Jan 03 2.0%
Feb 03 1.5%
Mar 03 3.0%
..
..
..

Now my requirment is that user can select reporting period, Like Feb 03
to Sep 03. I need to calculate Index based on 100. so the result will
be

return Index
Feb 03 1.5 101.5 (100 + 100 * 1.5/100)
Mar 03 3.0 104.545 (101.5 + 101.5 * 3.0/100)
..
..
Sep 03 2.3 120.67 ....

This means Index starts from the month selected by the user at the time
of viewing the report.

I have achived this by creating a calculated member in MDX using with
set [TimeRange] as '{[Time].[All Year].[2003].[3]:[Time].[All
Year].[2003].[9] }'

MEMBER [Measures].[Index] as 'IIF ([time].currentmember IS
[timerange].Item(0),
100 + (100 *( [Measures].[ROR]))
,[time].prevmember + ([time].prevmember *( [Measures].[ROR])))'

Is there any way by which i can store this in Analysisserver.

Thanks,
Sanjeev



Reply With Quote
  #3  
Old   
Sanjeev
 
Posts: n/a

Default Re: calculated member based on parameter - 08-11-2005 , 10:12 AM



defination so that my mdx becomes simpler as there are lots of mdx
based on this expression


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.