dbTalk Databases Forums  

Calculated Cell with LAG logic

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


Discuss Calculated Cell with LAG logic in the microsoft.public.sqlserver.olap forum.



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

Default Calculated Cell with LAG logic - 07-15-2003 , 02:47 PM






Hi all,

I have (what is an easy calc script in Essbase) a calc in
AS which I would like to do the following.

If Version = "ACT03" and Month <> "Jan" then
"Period Begin Total" = "Period End Total".lag(1)

Else If Version = "ACT03" and Month = "Jan" then

"Period Begin Total" = "Period End Total" intersecting
with "Dec" and "ACT02"

End If

Basically I am moving a balance from last month to the
current month, but taking into account a Version/Scenario
dimension.

Any ideas/suggestions or examples from Foodmart would be
great.

Thanks,

Mark

Reply With Quote
  #2  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Calculated Cell with LAG logic - 07-16-2003 , 12:29 AM






Something along those lines:

CREATE CELL CALCULATION FOR '(ACT03, [Period Begin Total])' AS
'
IIF( Month.CurrentMember IS Month.Jan, ([Period End Total],
Month.PrevMember), (ACT02, Month.December, [Period End Total]))
'

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================
"Mark Frank" <markfrank22 (AT) netscape (DOT) net> wrote

Quote:
Hi all,

I have (what is an easy calc script in Essbase) a calc in
AS which I would like to do the following.

If Version = "ACT03" and Month <> "Jan" then
"Period Begin Total" = "Period End Total".lag(1)

Else If Version = "ACT03" and Month = "Jan" then

"Period Begin Total" = "Period End Total" intersecting
with "Dec" and "ACT02"

End If

Basically I am moving a balance from last month to the
current month, but taking into account a Version/Scenario
dimension.

Any ideas/suggestions or examples from Foodmart would be
great.

Thanks,

Mark



Reply With Quote
  #3  
Old   
Mark Frank
 
Posts: n/a

Default Re: Calculated Cell with LAG logic - 07-17-2003 , 11:23 AM



Hi Mosha,

Thanks for the response. I spent yesterday trying to get
it to work but no luck. The following syntax parses, but
does not move my numbers from the previous month to the
current one. Is this due to solve order, calc pass etc?


CREATE CELL CALCULATION CURRENTCUBE.[Transfer End to
Begin] FOR

({[Stats_Version].[Version].[ACT].[ACT03]},
{[Stats_Measures].[Measures].[Portfolio Drivers].
[U_Pfolio_BeginBal]})AS

IIF([Stats_Period].currentmember IS [Stats_Period].[FY].
[Q1].[JAN],

([Stats_Measures].[Measures].[Portfolio Drivers].
[U_Pfolio_Bals],[Stats_Version].[Version].[ACT].[ACT03]),

([Stats_Measures].[Measures].[Portfolio Drivers].
[U_Pfolio_Bals],[Stats_Period].prevmember))

Thanks,

Mark

Also, do you have any documentation on Calc Cells i.e.
examples in foodmart. I am trying to migrate an Essbase
environment to AS and need a little help with translating
Calc Scripts.


Quote:
-----Original Message-----
Something along those lines:

CREATE CELL CALCULATION FOR '(ACT03, [Period Begin
Total])' AS
'
IIF( Month.CurrentMember IS Month.Jan, ([Period End
Total],
Month.PrevMember), (ACT02, Month.December, [Period End
Total]))
'

--
==================================================
Mosha Pasumansky - www.mosha.com/msolap
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no
warranties, and
confers no rights.
==================================================
"Mark Frank" <markfrank22 (AT) netscape (DOT) net> wrote in message
news:02ac01c34b09$e1025080$a401280a (AT) phx (DOT) gbl...
Hi all,

I have (what is an easy calc script in Essbase) a calc
in
AS which I would like to do the following.

If Version = "ACT03" and Month <> "Jan" then
"Period Begin Total" = "Period End Total".lag(1)

Else If Version = "ACT03" and Month = "Jan" then

"Period Begin Total" = "Period End Total" intersecting
with "Dec" and "ACT02"

End If

Basically I am moving a balance from last month to the
current month, but taking into account a
Version/Scenario
dimension.

Any ideas/suggestions or examples from Foodmart would be
great.

Thanks,

Mark


.


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.