We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Copy data from variable row below based on criteria

dgaines1972
7 - Meteor

I a beginner/Intermediate user to Alteryx.  have a set of data where I need to create a new column "country" based on data in the next row below where the next row below contains the value 'country". The row below is not always Row+1.  Attached is a sample input and desired output.  I think a combination of Transpose/CrossTab/Multi-row formula can do this, but I am not sure how to write it.  Thanks

 

Input: 

Location TypeLocation
BuildingBlue
BuildingGreen
CountryUSA
BuildingRed
BuildingOrange
CountryUK
BuildingYellow
CountryFrance
BuildingBlack
CountryNorway
BuildingBrown
BuildingBlack
BuildingCienna
BuildingPink
BuildingNeon
CountryAfrica

 

Desired Output:

Location TypeLocationCountry
BuildingBlueUSA
BuildingGreenUSA
CountryUSAUSA
BuildingRedUK
BuildingOrangeUK
CountryUKUK
BuildingYellowFrance
CountryFranceFrance
BuildingBlackNorway
CountryNorwayNorway
BuildingBrownAfrica
BuildingBlackAfrica
BuildingCiennaAfrica
BuildingPinkAfrica
BuildingNeonAfrica
CountryAfricaAfrica
4 REPLIES 4
FinnCharlton
13 - Pulsar

Hi @dgaines1972 ,

This is one way to do this:

FinnCharlton_0-1675877323003.png

 

binuacs
21 - Polaris

@dgaines1972 One way of doing this

binuacs_0-1675878637905.png

 

 

dgaines1972
7 - Meteor

Thank you so much!  This works great.

dgaines1972
7 - Meteor

Thank you so much @FinnCharlton.  This solution is doable.

Labels
Top Solution Authors