Alteryx Designer Desktop Discussions

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

Showing A+B as same as B+A in the rows

suraj_ford
7 - Meteor

Hello Guys,

 

I have number of rows of data (representative purpose) as shown,

Col_1Col_2Value
AB0.45
BA0.45
AC0.87
BC0.34
CB0.34

And I want the output to consider A & B 0.45 to be same as B&A 0.45 and eliminate one of the row(preferably second.  i.e.  B & A. So the expected output would be like this.

Col_1Col_2Value
AB0.45
AC0.87
BC0.34

Please help, how to do this in Alteryx.

11 REPLIES 11
Emil_Kos
17 - Castor
17 - Castor

Hi,

 

I have mocked up the workflow for you:

 

Emil_Kos_0-1604847081100.png

 

The output:

 

Emil_Kos_1-1604847090231.png

 

 

Please mark as a solution if it was helpful!

Good Luck!

Qiu
20 - Arcturus
20 - Arcturus

@suraj_ford 

I took a bit different approach with @Emil_Kos , more tools though😁

1109-suraj_ford.PNG

suraj_ford
7 - Meteor

@Emil_Kos ,

 

Can you please share your workflow with me..

 

suraj_ford
7 - Meteor

Thank you @Qiu , but my actual data has 685 columns and more than 480k rows, so changing their name is not an option for me as you have done with record ID then changed it back to col_1 and col_2.

 

Can you suggest me any other way?

 

 

suraj_ford
7 - Meteor

@Emil_Kos ,

 

Also the rows which are duplicating may not necessarily be at position +1 row or -1 row. Since I have 480k rows of data, first row may have A+B and last row B+A, for such case I don't think your solution can be used. Please help with your thoughts on this.

 

Qiu
20 - Arcturus
20 - Arcturus

@suraj_ford 
Instead of Select Tool, we can use Dynamic Rename Tool to name the columns

1109-suraj_ford-1.PNG

Emil_Kos
17 - Castor
17 - Castor

Hi @suraj_ford,

 

I needed to prepare another workflow for you.

 

I believe it should work for your data set:

 

Emil_Kos_0-1604904838496.png

 

 

 

suraj_ford
7 - Meteor

Thank you @Emil_Kos . That's a great way to do it.

 

Emil_Kos
17 - Castor
17 - Castor

Hi @suraj_ford,

 

If this post was helpful please mark it as an answer. 

One topic can have more than 1 post marked as an answer.

 

Thank you for a kind word and good luck!

Labels