Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

MDX - Next 90 days and Las 90 Days of Data

$
0
0

Hi All,

I have to create two different calculated measures on a measure, one for last 90 days based on Startdate and other for next 90 days based on enddate.

Two time dimensions(StartDate, Enddate)

One measure group - a measure.

I created two calculated measures one for each and the cube is working fine for each of them individually but returns blank values when I use both date filters.


[Last 90days] =  SUM({[Start Date].[Date].CurrentMember.Lag(90):[Start Date].[Date].CurrentMember},[Measures].[Amount])

[Next 90days] = SUM({[End Date].[Date].CurrentMember:[End Date].[Date].CurrentMember.Lead(90)},[Measures].[Amount])

Can you please help me with this. Thanks

Tinku


Viewing all articles
Browse latest Browse all 2472


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>