2 Replies Latest reply: Apr 8, 2017 5:20 PM by bhuvan agarwal RSS

    Linking Slowly Changing Dimensions

    Mikhail Bespartochnyy

      Hello community,

       

      I'm having trouble wrapping my head around IntervalMatch function. I read couple of posts about it, but I'm having trouble implying it to my scenario.

       

      I have a database containing Catalog of items, holding information like product ID, description, price, price effective and expiration date, etc. Then I have a separate database containing record of Purchases. The Purchases database holds Product ID, Purchase date and purchase quantity.

       

      Some Product IDs repeat in Catalog because they had one price and description at one period in time and a different price and description later on. In attached QVW, when Catalog is joined to Purchases table in the data model and I create a table box showing Product ID, Purchase Date, Description, and Purchase Price I get three lines for each date because this particular item had a price change three times in the past.

       

      I believe IntervalMatch is an appropriate function to solve this, but I'm having trouble writing a script to get it to work. Can anyone please help me fix this? I'm trying to get QV to show one description per product ID based on purchase date. Is this possible without writing a While Loop?

       

      Thanks,

       

      Mikhail Bespartochnyy