On the detail of a POS receipt/sale, there are sequential item numbers. When a discount occurs on an item, it is always the next item number on the receipt. Unfortunately in my POS world, the Product Type identifies it as a "Retail Discount" but the Product Category is identified as "N/A". I need to pull the Product Category from the previous line item to populate on the discount line item for financial reporting (in my example Product Category_calc). I've attached an Excel spreadsheet with the key items outlined. This data is from a FileMaker 12 database. I would be very grateful for any help with this.