Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date comparison in set analysis

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.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create a Straight Table

Dimension

UserID

Expression

SUM(IF(OrderDate > DateUsedCode, Amount))

View solution in original post

3 Replies
MK_QSL
MVP
MVP

Can you also provide the result you are looking for in excel file?

Anonymous
Not applicable
Author

I've added a third tab called "Result".

MK_QSL
MVP
MVP

Create a Straight Table

Dimension

UserID

Expression

SUM(IF(OrderDate > DateUsedCode, Amount))