Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Join tool to only show value of first row from variable

LM_APAC2023
7 - Meteor

Hi Alteryx enthusiasts,

 

I was hoping for your help on my below problem, adding an example data set on what I am referring to as well.

 

I am matching file 1 and 2 based on SKU number and the desired outcome would be to not duplicate the price for each of the rows under one contract, but only show the total list and net price once per contract.

 

At the moment my joint is showing the price per contract product feature, means 30 Euros instead of the correct amount of 10 Euros.

 

Do you know what would be the best way to achieve the desired outcome?

 

Thanks a ton!

4 REPLIES 4
caltang
17 - Castor
17 - Castor

Your SKU Number is not unique on both datasets, meaning that a many-to-many relationship exists. In this case, "SKU number" as your primary key alone is not enough to differentiate them when you Join them, thereby leading to your duplicate values.

 

Are there any other fields which you can reference as a secondary key to help in your Join?

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
binuacs
21 - Polaris

@LM_APAC2023 you have duplicate entries for SKU numbers which causing the duplicate rows in the join

binuacs_0-1683556992990.png

 

LM_APAC2023
7 - Meteor

Thanks both!

 

One SKU number can be part of several different product families and therefore is in the data more than once.

 

Within one product (e.g., AA) Is there a way for me to merge the data and only show one row value for list and net price instead of duplicating them across all rows after joining? Similar to the desired outcome tab.

 

Thank you!

caltang
17 - Castor
17 - Castor

Because SKU Number exists multiple times in both datasets, you will have a many-to-many relationship.

 

In order to achieve your outcome, there must be something else besides SKU Number that can act as a key for Joining both datasets. Do you know what that key would be?

 

Break it down based on logic, how would you solve this and how would you know which part goes where? That will help us understand your problem and requirement better.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors