dbTalk Databases Forums  

Sum of date different-urgent

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


Discuss Sum of date different-urgent in the microsoft.public.sqlserver.olap forum.



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

Default Sum of date different-urgent - 06-02-2005 , 07:34 PM






Hi all gurus

In my fact table i have two columns for date data type.
I want sum of its difference as a measure.

How can I get it?

--
Thanks

Am



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

Default Re: Sum of date different-urgent - 06-02-2005 , 09:22 PM






Assuming the data source is SQL Server and the fact table columns are
BegDate and EndDate, then add a cube measure like [SumDateDiff] with
aggreagation function of 'sum'. Then define the measure 'source column'
as SQL expression:

DateDiff(dd, myfact.BegDate, myfact.EndDate)

(assuming that the difference is computed in days)


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