Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

Workflow Help

tpalensky002
5 - Atom

Hi All,

 

Thank you in advance for your help. I have a workflow I am trying to build and am not sure where to start. I have included a sample data set below. I want to sum Revenue for each customer but only for the first contract start date. For example, I want the total of Revenue for Customer 2200 for the contract that starts in 2003 but don't want to sum revenue for the 2007, 2011, or 2015 contract start dates. I have a large file with 7k+ unique customer IDs so it is obviously too much to do manually. Any help would be appreciated.

alteryx.JPG

 

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

@tpalensky002,

 

I am a little confused by your question.  I think that the first step is to find the FIRST contract start date for each customer.  If a customer can only have 1 first date record, then you can use a SAMPLE tool (where incoming data is sorted by Customer ID + Contract Start Date) and select the 1st 1 record.  Then you'll see 2003 coming out for #2200 and 2004 for #1000.  If there are many first records possible, then you would SUMMARIZE.

 

To Summarize, you will first need to find the first year for each ID (either summarize with a groupby ID and MIN for Date or use the Sample technique above).  Then JOIN that result to the original data on ID + Date.  Now you will only get data for the first date coming through the join (eliminate all duplicate fields).  Next you use the SUMMARIZE to group by the ID and get the SUM of the revenue.

 

Hopefully, this solves your challenge.  If it doesn't, you might need a better example set of data and results.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
tpalensky002
5 - Atom

Hi Mark,

 

Thanks so much for your help! I was able to accomplish it using the SUMMARIZE and JOIN tool in the second method you described. 

 

You rock!