Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Copy values in a column to each record

JDong
8 - Asteroid

Dear All,

 

I have the below table and need to achieve the last  'Sales USA' column

 

CountryCategorySub-CategorySalesSales USA
USAFurnitureBookcases261.96261.96
USAOffice SuppliesChairs731.94731.94
USATechnologyLabels14.6214.62
ChinaFurnitureBookcases1900261.96
ChinaOffice SuppliesChairs485731.94
ChinaTechnologyLabels35014.62
AustraliaFurnitureBookcases445261.96
AustraliaOffice SuppliesChairs725731.94
AustraliaTechnologyLabels120814.62

 

As we see here the last column is a copy of the USA data. So for every country in my dataset need to repeat and copy the USA data as a column. The category and Sub category columns are constant for all countries.

 

Do let me know in case of any questions.

 

Thanks

24 REPLIES 24
JDong
8 - Asteroid

Ah I mean...the new countries are added after the final result using another join.

 

When we consider the result as shown above is there a way to copy the values to all countries like last time ?

 

Thanks

atcodedog05
22 - Nova
22 - Nova

Hi @JDong 

 

Here is an example working for new data set

 

Output:

atcodedog05_0-1606836944532.png

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @JDong 

 

Suggestion would be add the data at begin itself instead of working after join😅

JDong
8 - Asteroid

Hi @atcodedog05 

 

The problem is data is from a separate source

 

So the 2nd source has only these records

 

CountryCategorySub-CategorySalesSales USA
KoreaFurnitureBookcases  
KoreaOffice SuppliesChairs  
KoreaTechnologyLabels  
GermanyFurnitureBookcases  
GermanyOffice SuppliesChairs  
GermanyTechnologyLabels  
PolandFurnitureBookcases  
PolandOffice SuppliesChairs  
PolandTechnologyLabels  

 

And the result of current flow is 

 

CountryCategorySub-CategorySalesSales USA
USAFurnitureBookcases261.96261.96
ChinaFurnitureBookcases1900261.96
AustraliaFurnitureBookcases445261.96
USAOffice SuppliesChairs731.94731.94
ChinaOffice SuppliesChairs485731.94
AustraliaOffice SuppliesChairs725731.94
USATechnologyLabels14.6214.62
ChinaTechnologyLabels35014.62
AustraliaTechnologyLabels120814.62
KoreaFurnitureBookcases  
KoreaOffice SuppliesChairs  
KoreaTechnologyLabels  
GermanyFurnitureBookcases  
GermanyOffice SuppliesChairs  
GermanyTechnologyLabels  
PolandFurnitureBookcases  
PolandOffice SuppliesChairs  
PolandTechnologyLabels  

 

Considering this to be the current output is there a way to copy the values to other countries.

 

I understand you telling me about the fixing the data initially but this input is more like adhoc and the countries list changes every week, but values need to me copied over dynamically. 😀

 

Thanks

JDong
8 - Asteroid

Hi @atcodedog05 

 

Thanks.

 

So I am not able to join the data before since in the flow this input is dynamic on a weekly basis

 

KoreaFurnitureBookcases  
KoreaOffice SuppliesChairs  
KoreaTechnologyLabels  
GermanyFurnitureBookcases  
GermanyOffice SuppliesChairs  
GermanyTechnologyLabels  
PolandFurnitureBookcases  
PolandOffice SuppliesChairs  
PolandTechnologyLabels  

 

So after this join in the end of the flow we get this

 

CountryCategorySub-CategorySalesSales USA
USAFurnitureBookcases261.96261.96
ChinaFurnitureBookcases1900261.96
AustraliaFurnitureBookcases445261.96
USAOffice SuppliesChairs731.94731.94
ChinaOffice SuppliesChairs485731.94
AustraliaOffice SuppliesChairs725731.94
USATechnologyLabels14.6214.62
ChinaTechnologyLabels35014.62
AustraliaTechnologyLabels120814.62
KoreaFurnitureBookcases  
KoreaOffice SuppliesChairs  
KoreaTechnologyLabels  
GermanyFurnitureBookcases  
GermanyOffice SuppliesChairs  
GermanyTechnologyLabels  
PolandFurnitureBookcases  
PolandOffice SuppliesChairs  
PolandTechnologyLabels  

 

Is there a way from here to copy the values based on the countries which is dynamic ?

 

Thanks

atcodedog05
22 - Nova
22 - Nova

Hi @JDong 

 

Does the new table/values have sales. If it doesn't how is the sales considered.

JDong
8 - Asteroid

Hi @atcodedog05 

 

Only the Sales USA column needs to be populated.

 

Sales is empty in the data for now. But anyway the Sales USA is an independet column where Sales for USA are copied.

 

Thanks

atcodedog05
22 - Nova
22 - Nova

Hi @JDong 

 

Would something like this do.

Workflow:

atcodedog05_1-1606886627198.png

Output:

atcodedog05_0-1606886608745.png

 

Check and let me know🙂

 

JDong
8 - Asteroid

Thanks a lot...I will try and read data before in the flow and get back in case of anything.

 

Great solution ! 😀

atcodedog05
22 - Nova
22 - Nova

Sure definitely 🙂 @JDong 

 

Happy to help 🙂

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels
Top Solution Authors