Showing results for 
Search instead for 
Did you mean: 

Repeat Customer Formula

0 Kudos

I'm not familiar with the syntax of SAP. How would I write the following expression?

  1. First I want to return the row/record where the customer_id has a ship_status of 'complete'. If there are multiple records, I only want to return the one with the latest MIN()ship_date.
  2. Then I want to print "return" in the row where same customer_id appears with a request_date >= on or after MIN()ship_date previously noted AND where item_id = 5 or 10

ROW 1:

customer_id 45, invoice_id 1001, request_date 1/1/22, ship_date 1/10/11, ship_status = 'complete', item_id = 5

ROW 2:

customer_id 45, invoice_id 1005, request_date 2/5/22, ship_date 'null', ship_status 'null', item_id = 10

Report should print "return" for the second row based on the first rows data points.

Thank you for your assistance!

Accepted Solutions (0)

Answers (0)