Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


MDX to calculate measure between two dates


MDX to calculate measure between two dates

Author
Message
savioceg
savioceg
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 11
Hi ,

I have a dimension which has the following data

Name StartDate
EndDate Duration
PreSalesStartDate PostSalesEndDate

Sales1 01-Jan-2010
31-Jan-2010 31
01-Dec-2009 02-Mar-2010

Duration refers to the dfference between start date and end date .

PreSalesStart date is nothing but subtracting 31 days ( the duration ) from the start date and PostSalesEndDate refers to the addition of duration period to the End Date .

I have a cube which returns me the sales which happened between the start date and the end date . ( I have a separate time dimension which is related to the fact table )

Now when i try to find the sales which happened between the presalesstartdate and startdate . i am not getting null in the display .

I have tried using the mdx as follows

(presalesstartdate:startdate,measures.sales)

Please let me know what i am missing, i am sure it should be something with the logic that i am applying and not on the syntax because i am not getting any #value error while displaying the data

Regards,

Savio
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search