question

adenijikunle avatar image
adenijikunle asked

Joining Two Date Fields in a cube with Different Range

Hi, I need some help here please. I'm working on an ssas 2012 project and having a challenge. See the query below and the attached Data Source View Diagram. select * from [dbo].[vwfactpayTrans] p inner join [dbo].[VW_Dim_Loan] l on p.BOSSLoanID = l.BOSSLoanID where p.effectiveDate between '4/13/2014' and '4/19/2014' and l.Due_Date < '4/13/2014' and p.store_no = 'C13' and p.Paid_By <> 'E' The same query above we'll like to create a cube for. There two date dimensions in the cube, the first is called Time and joins foreign key is the "Actual Date" from the fact table called [dbo].[vwfactpayTrans]. The second date dimension is called "Effective date" and the foreign key is "Due Date" from the fact table ].[VW_Dim_Loan]. However, the challenge is that the date range are different. How can I filter both tables correctly in my cube. Will appreciate your help. Thanks Olu [1]: /storage/temp/1479-cube_diagram_2.png
date
cube_diagram.png (38.5 KiB)
cube_diagram_2.png (40.9 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.