dbTalk Databases Forums  

Storing Previous Measure value in MDX

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


Discuss Storing Previous Measure value in MDX in the microsoft.public.sqlserver.olap forum.



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

Default Storing Previous Measure value in MDX - 02-20-2006 , 03:45 AM






Hello All,

The issue we are facing now is that, we need something like

[Measures].[Current Count] AS '(Normal Measure, [Date
Dim].[Year].CurrentMember)'

[Measures].[Total Count] AS 'COALESCEEMPTY([Measures].[Total Count], 0) +
[Measures].[Current Count]'

SELECT

{[Measures].[Total Count]}

ON COLUMNS,

[Date Dim].[Year].MEMBERS

ON ROWS

FROM

[MyCube]

We don't want to use any aggregate function to calculate the running count,
As it had a performance hit since the above query is a part of a bigger MDX
query.

The problem is we cannot refer to the previous value of [Measures].[Total
Count] When the statement

[Measures].[Total Count] AS 'COALESCEEMPTY([Measures].[Total Count], 0) +
[Measures].[Current Count]'

Is processed.

It would be very helpful if you could help us in solving this issue.

Regards,

Raja Nadar



Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Storing Previous Measure value in MDX - 02-21-2006 , 12:00 AM






Hi Raja,

Can you give examples of what the cube data looks like, and what the
values for the calculated measures should be? Also the cube dimensions -
that will make your scenario clearer.


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

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.