Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Days Between Two Events - Two Date Dimensions

$
0
0

Greetings :D

I have a cube modelling ‘In-Flight’ events as per Mosha’s article…

An interesting ‘Days Since Last Event’ style problem has arisen… the PrevMember trick at (http://consultingblogs.emc.com/christianwade/archive/2011/01/15/days-since-last-event-tsql-vs-mdx-vs-dax.aspx) is not working here because there are 2 date dimensions.

Problem

Return the distinct set of DimCustomers in the below example where there exists at least two rows for that customer with a DateFrom on one row and DateTo on another row that are less than 7 days apart…

Yellow background shows an example match.

DateFrom, DateTo, and Customer are dimensions.


Thanks! Josh


Viewing all articles
Browse latest Browse all 14337

Trending Articles



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