title: Microstrategy - Unable to calculate the difference between two dates related by fact table
body: <p>We are trying to calculate the difference between two dates.</p>
  
  <p>The scenario is the following.</p>
  
  <pre><code>3 Dimensions:
  DIM_DATE
  DIM_RELEASE_DATE (Alias of DIM_DATE)
  DIM_PRODUCT
  
  1 Fact table:
  FT_SALES
  
  FT_SALES relates to DIM_DATE and DIM_PRODUCT.
  DIM_RELEASE_DATE relates to DIM_PRODUCT
  </code></pre>
  
  <p>Currently the DIM_DATE.DATE and DIM_RELEASE_DATE.DATE are attributes.</p>
  
  <p>We are trying to calculate the Days Between DIM_RELEASE_DATE.DATE and DIM_DATE.DATE
  ie. DaysBetween(DIM_RELEASE_DATE.DATE@ID,DIM_DATE.DATE@ID)</p>
  
  <p>My understanding is that I cannot create a compound attribute using dimension columns from two tables. 
  I tried creating facts for each date field and performing the DaysBetween in a metric. This unfortunately results in a CROSS JOIN which is huge.</p>
  
  <p>How can i go about calculating the difference between two attributes (or facts) that are related through a fact table while avoiding a cross join ?</p>
  
  <p>Thanks</p>