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

MDX for records between date range where start and end date being separate columns

$
0
0

Hi .. need help in this 

Is it possible  to  write in MDX to extract records between two dates …. where start and end date are 2 diff columns in the same table

Like if I write in SQL .

Select

Dimdate.Date, F.Col1 from Fact F

join DimDateon (Dimdate.Date between F.D1startand  F.D1end) // 1st date range condition

where

Dimdate.Date between F.D2startand  F.D2end // 2nd date range condition

and

Dimdate.Date between F.D3startand  F.D3end // 3rd date range condition

and then  in MDX 

SELECT [Measures].[Rowcount]onColumns,

     NonEmpty([Dimdate].[Date].members)onRows

From [CubeName]

Where (Date range Joining conditions) // I know Where in MDX acts as slicer .. So like to know where  I can put that and how  .

Finally I will have output

Dates from Dimdate and corresponding measure values which are satisfying that date range





Viewing all articles
Browse latest Browse all 2472

Trending Articles



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