I inherited a report which I need to make a revision and would like to do so without having to rewrite it.
The report is currently grouped by customer segment and within segment each customer can have multiple orders. Here is an example of what the data may look like.
Segment|Email|Order_Date|Orderid
Sorority,test@email.com,10/01/2012,10001
Sorority,test@email.com,10/10/2012,10410
Sorority,test2@email.com,10/07/2012,10311
Sorority,test@email.com,10/05/2012,10200
Sorority,test3@email.com,10/15/2012,10425
Sorority,test3@email.com,10/19/2012,10630
I need to determine the min order date for each customer in order to tell whether they were new or a repeat. Each customers first order within the date range should always be new and each subsequent order for that customer would be repeat. Perhaps there is an easy way of doing this without having to create a subreport or rewrite in sql.
I would like my data to appear as follows.
Segment|Email|Order_Date|Orderid|new_repeat
Sorority,test@email.com,10/01/2012,10001,new
Sorority,test@email.com,10/10/2012,10410, repeat
Sorority,test2@email.com,10/07/2012,10311,new
Sorority,test@email.com,10/05/2012,10200,repeat
Sorority,test3@email.com,10/15/2012,10425,repeat
Sorority,test3@email.com,10/19/2012,10630,new
Thanks for your help
The report is currently grouped by customer segment and within segment each customer can have multiple orders. Here is an example of what the data may look like.
Segment|Email|Order_Date|Orderid
Sorority,test@email.com,10/01/2012,10001
Sorority,test@email.com,10/10/2012,10410
Sorority,test2@email.com,10/07/2012,10311
Sorority,test@email.com,10/05/2012,10200
Sorority,test3@email.com,10/15/2012,10425
Sorority,test3@email.com,10/19/2012,10630
I need to determine the min order date for each customer in order to tell whether they were new or a repeat. Each customers first order within the date range should always be new and each subsequent order for that customer would be repeat. Perhaps there is an easy way of doing this without having to create a subreport or rewrite in sql.
I would like my data to appear as follows.
Segment|Email|Order_Date|Orderid|new_repeat
Sorority,test@email.com,10/01/2012,10001,new
Sorority,test@email.com,10/10/2012,10410, repeat
Sorority,test2@email.com,10/07/2012,10311,new
Sorority,test@email.com,10/05/2012,10200,repeat
Sorority,test3@email.com,10/15/2012,10425,repeat
Sorority,test3@email.com,10/19/2012,10630,new
Thanks for your help