dbTalk Databases Forums  

recalculating Account in MDX statement

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


Discuss recalculating Account in MDX statement in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
J. Nathalia
 
Posts: n/a

Default recalculating Account in MDX statement - 02-12-2004 , 09:56 AM






Please find below the MDX formula assigned to account A1040. The result is for Actual, Current and Standard always error

However when ik assign this MDX statement to a new calculated member the proper values appear. I think the problem is the original value at A1040. For instance Actual A1040 is equal to 999 from the datawarehouse. The formula will re-assign A1040 according to the formula

It seems that if a formula is assigned, the formula is prevelant to the original value. Does anybody know how to solve this

Iif([Measures].CurrentMember is [Actual]
([Measures].[Actual], [Account].&[A1040])
Iif([Measures].CurrentMember is [Current]
([Measures].[Actual], [Account].&[A1040])
Iif([Measures].CurrentMember is [Standard]
([Measures].[Standard], [Account].&[A1040])





(I know that this statement could be abbreviated easily, but this example looks more clear to explain)

Reply With Quote
  #2  
Old   
Richard Tkachuk [MS]
 
Posts: n/a

Default Re: recalculating Account in MDX statement - 02-12-2004 , 06:42 PM






It's an infinite recursion problem. You're asking for a value that depends
on itself. The calculationpassvalue function might help you out to remove
the infinite recursion. ANd you can simplify this a bit. Try this:

Iif([Measures].CurrentMember is [Measures].[Actual] or
[Measures].CurrentMember is [Measures].[Current],
calculationPassValue(measures.actual,-1,relative),
calculationPassValue(measures.standard,-1,relative)
)

Be cautious with calculationpassvalue function. Most of the time everything
is just fine, but if you're doing funny things with passes it might not give
you the results you expect.

Hope this helps,
Richard
--
This posting is provided 'AS IS' with no warranties, and confers no rights.

"J. Nathalia" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Please find below the MDX formula assigned to account A1040. The result is
for Actual, Current and Standard always error.

However when ik assign this MDX statement to a new calculated member the
proper values appear. I think the problem is the original value at A1040.
For instance Actual A1040 is equal to 999 from the datawarehouse. The
formula will re-assign A1040 according to the formula.
Quote:
It seems that if a formula is assigned, the formula is prevelant to the
original value. Does anybody know how to solve this?

Iif([Measures].CurrentMember is [Actual],
([Measures].[Actual], [Account].&[A1040]),
Iif([Measures].CurrentMember is [Current],
([Measures].[Actual], [Account].&[A1040]),
Iif([Measures].CurrentMember is [Standard],
([Measures].[Standard], [Account].&[A1040]),
0
)
)
)

(I know that this statement could be abbreviated easily, but this example
looks more clear to explain)




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.