2 Replies Latest reply: Mar 10, 2017 11:07 AM by Crystle Stamper RSS

    IntervalMatch not working, says "Field not found"

    Crystle Stamper

      I am trying to use the IntervalMatch function to create a Bridge table for my Slowly changing dimensions, like in this example.

       

      Slowly Changing Dimensions

       

      However, it keeps telling me "Field not found" for the interval match. If I remove the interval match and just load the table, it will run, but for some reason it will not load the interval match.

       

      Does anyone know why this would happen?

       

      Here is my code.

       

      ABC_ChangeCodes:
      LOAD ABC_PartNumber as PartID,
      ABC_ChangeCode,
      Date#(FromDate) as FromDate,
      Date#(ToDate) as ToDate,
      ABC_PartNumber &'|'& FromDate &'|'& ToDate as KEY_PartID_Interval   //BridgeKey
      FROM
      data\ABC_ChangeCodes.qvd]
      (
      qvd);

       

      Counts:
      LOAD Distinct
        
      QC_DATE,  
         ABC_PartNumber as TmpPartID,
         ABC_PartNumber &'|'& QC_DATE as KEY_PartID_CountDate  //BridgeKey
      FROM
      Data\QtrCounts.qvd]
      (
      qvd)
      Where QC_Count <> 0
      ;

       

      TmpBridgeTable:
      IntervalMatch(QC_DATE,TempPartID) // THIS IS THE LINE THAT KEEPS FAILING
      LOAD Distinct
      FromDate,
      ToDate,
      PartID as TmpPartID
      Resident ABC_ChangeCodes;