Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to keep only the first occurrence of a value in a column

JPassion13
5 - Atom

I have a list of product IDs, the current spend of each product, the annual budget for each product and the Department who have purchased the products:

 

JPassion13_1-1636274113938.png

 

I want to only keep the first occurrence of the Annual Budget amount for each Product ID so I can work out the correct value for the total annual budget amount if I need to group and sum the records i.e. I want the output to look like this:

 

JPassion13_2-1636274144165.png

 

Please can someone help me with this?

 

Thanks in advance! 

 

 

 

 

1 REPLY 1
danilang
19 - Altair
19 - Altair

Hi @JPassion13 

 

You can get rid of the subsequent Budget amounts by using a multirow tool with the following config

 

danilang_0-1636284171767.png

You can also get the summaries without having to remove the subsequent Budget rows by using the First operator in the Summarize tool

danilang_1-1636284320038.png

Both of these options are included in the attached workflow.  

 

In future, if you have a large amount of input data, please include a sample file or at least a text table as apposed to an image.  It makes it much easier for people to help you.

 

Dan 

 

Labels
Top Solution Authors