dbTalk Databases Forums  

Getting The latest available data

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


Discuss Getting The latest available data in the microsoft.public.sqlserver.olap forum.



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

Default Getting The latest available data - 03-17-2006 , 12:21 PM






Hi , Iam using LookUp cube function to get some measure based on time
dimension from another cube. If the measure is not available for that
particular date , I should query to give the latest available data for
that measure. Help me with MDX query.

Thanks in advance. .


Reply With Quote
  #2  
Old   
siva
 
Posts: n/a

Default Re: Getting The latest available data - 03-19-2006 , 08:32 PM






Any help on this would be appreciated. Thanks.


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

Default Re: Getting The latest available data - 03-19-2006 , 10:52 PM



This MSDN paper discusses how to compute the (last non empty) closing
balance for a measure:

http://msdn.microsoft.com/sql/defaul...n-us/dnsql2k/h
tml/semiadd2.asp
Quote:
Analysis Services: Semiadditive Measures and Inventory Snapshots
...
In this example, the [Last Non Empty Value] measure has a recursive
expression that checks to see whether the value of the current cell is
empty. If it is empty, the expression moves back to the previous period
on the time dimension and checks the [Last Non Empty Value] of the
previous period. The function continues to go back in time until a
nonempty value is found.
...
Quote:

- 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.