Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have 2 tables, one with customers who have used a discount code, and another that has all purchases for all customers.
I wan't to calculate all the purchases a customer has made after the customer has used a discount code. So if a customers uses 2 discount codes, one sale could end up in two columns, one for each discount code, if the sale date is after both discount code dates.
Attached is a simple Excel with how my data looks like.
Create a Straight Table
Dimension
UserID
Expression
SUM(IF(OrderDate > DateUsedCode, Amount))
Can you also provide the result you are looking for in excel file?
I've added a third tab called "Result".
Create a Straight Table
Dimension
UserID
Expression
SUM(IF(OrderDate > DateUsedCode, Amount))