6 Replies Latest reply: May 29, 2011 1:18 PM by dlaplant RSS

    Slowly changing dimension problem

      Here is an example of a problem I want to solve with a slowly changing dimension.


      I have 2 tables - Department (Department, Manager, StartDate, EndDate) and Budget (Quarter, Department, BudgetAmount).  Managers always change department at the end a quarter in this example.


      I want to create a new table that includes the Budget columns and the Department.Manager.


      In SQL it would look like this:


      select Budget.Quarter, Budget.Department, Department.Manager, Budget.BudgetAmount

      from Budget, Department

      where Budget.Department = Department.Department

      and Budget.Quarter between Department.StartDate and Department.EndDate

      order by Department, Quarter asc


      I have a attached and Excel with sample data.


      I've tried to use intervalmatch without success.


      Message was edited by: dlaplant Added qvw with interval match.