Alteryx Designer Desktop Discussions

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

Replace a Row entry with a other Row entry

Massi1
7 - Meteor

Hey Alteryx Community, 

 

one Question. 

I have a many document numbers as a row and then i have multiple cost centers as colums. 

If the document number is booked under a cost center there is a 0 and if not there is a NULL. 

Now i must replace the entry of a row with a other entrie like if I have two 0 in a row and one of the row is over Cost center 600 than i must Replace the entry with the Cost number under 600.  Like This

 

document numberCost center 100Cost center 200Cost center 600
5151510Null0

 

Now i the row 515151 under Colum Cost Center 600 the 0 must replace with "Cost Center 100" 

 

Thanks! 

8 REPLIES 8
wwatson
12 - Quasar

could you give an example of the before data with maybe 4 or 5 rows and and example of how you want it to look afterwards?

 

That will help us provide appropriate guidance

Massi1
7 - Meteor

So the first Table is my Situation now. 

If I have 0 in CostCenters over 600. I must replace the 0 with CC who the other 0 is! 

IF theres only one 0 and thats in CC over 600 than change the 0 to NULL, If theres a 0 in CC under 600 then change nothing. 

 

AccountCC 100CC 101CC 102C200CC300CC400CC600CC610CC620CC630
12222220NULLNULLNULLNULLNULLNULL0NULLNULL
23232320NULL0NULLNULLNULLNULLNULLNULLNULL
55555550NULLNULLNULLNULLNULL0NULLNULLNULL
6666666NULLNULLNULLNULLNULL0NULLNULL0NULL
7777777NULLNULLNULLNULL00NULLNULLNULLNULL
8888888NULLNULL0NULLNULLNULLNULLNULLNULL0
           
           
           
AccountCC 100CC 101CC 102C200CC300CC400CC600CC610CC620CC630
12222220NULLNULLNULLNULLNULLNULLCC100NULLNULL
23232320NULL0NULLNULLNULLNULLNULLNULLNULL
55555550NULLNULLNULLNULLNULLCC100NULLNULLNULL
6666666NULLNULLNULLNULLNULL0NULLNULLCC400NULL
7777777NULLNULLNULLNULL00NULLNULLNULLNULL
8888888NULLNULL0NULLNULLNULLNULLNULLNULL

CC102

 

wwatson
12 - Quasar

You could try something like this

wwatson_0-1597221913918.png

 

Massi1
7 - Meteor

Thanks for the Reply, 

 

I think its a good idea. But I Add some elseIF because in the really data i Have some more Cost Centers. And then I get a error like the operator == is not gilty. 

 

Can you help me? 

Because in the formula its only = but never ==

wwatson
12 - Quasar

make sure you only have text columns included. The error could be because you've included the first column in the multi field tool and it is a numeric field

 

Massi1
7 - Meteor

Sorry my friend, 

 

but i only included only text datas. the Account number is not included. So i Dont really know what the problem is. 

wwatson
12 - Quasar

can you private message me the full formula you have now and I can take a look?

 

wwatson
12 - Quasar

@Massi1 did you get it working?

Labels