Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Need to change column values as title of the respective column

Gsiva3
8 - Asteroid

Hi Guys,

 

I have  a input with 100 column named as say for example AAAAA,BBBBB,CCCCC,DDDDD. And the contents in every column is "X". Now what my requirement is I want to copy the column title like "AAAAA" to its column value "X". I know it can be done with simple formula using formula tool. But my concern is since I have around 150 rows for which the same thing is done, is there any simple way to do this so.

 

Please help me on this guys

 

11 REPLIES 11
AkimasaKajitani
17 - Castor
17 - Castor

Hi @Gsiva3 

 

This is my solution for you.

AkimasaKajitani_0-1609134666651.png

 

1. Add the Record ID to keep the Record Position

2. Transpose

AkimasaKajitani_1-1609134758711.png

 

3. Copy the Field Name to Value by Formula tool

AkimasaKajitani_2-1609134773235.png

 

 

IF IsNull([Value]) THEN Null() ELSE [Name] ENDIF

 

 

At this time, if the field size of the Value is shorter than the name of the field, it will not be copied properly, so you may need to change the field length by using Select tool.

 

4. Cross Tab

AkimasaKajitani_3-1609134805925.png

 

 

Qiu
20 - Arcturus
20 - Arcturus

@Gsiva3 
I hope this is what you need.

1228-Gsiva3.PNG

Gsiva3
8 - Asteroid

S got it. Thanks @AkimasaKajitani 

 

But my another concern is after doing this, I want to add entries in all those column in a column named count. I have attached sample input & output here.

 

Please help me with this.

Gsiva3
8 - Asteroid

S got it. Thanks @Qiu 

 

But my another concern is after doing this, I want to add entries in all those column in a column named count. I have attached sample input & output here.

 

Please help me with this.

AkimasaKajitani
17 - Castor
17 - Castor

Hi @Gsiva3 

 

This is my solution for you.

I add count logic for that workflow.

AkimasaKajitani_0-1609139733571.png

1. Count by Summarize tool

 

AkimasaKajitani_1-1609139790366.png

 

2. Join with Record ID

AkimasaKajitani_2-1609139875020.png

 

 

 

Gsiva3
8 - Asteroid

Thank you so much @AkimasaKajitani 

 

Is absolutely working fine.

 

I have one final request. I have a rows named 12,13,14 & MKT, in which MKT is alone empty.

 

Now what I want is IF Value in Count column is 4, I want to create 4 empty rows and copy the values of 12,13,14 to those four empty rows, but for the market row alone, since count is 4 in that row " values in that cells are AAAAA,BBBBB,CCCCC,DDDDD" I want these contents to be copied to the market column. My output should be like "IF value count column is 4, then I need 4 rows along the values for 4 rows in column 12,13,14 whereas for MKT column alone, in the generated 4 rows, I want AAAAA in one row, BBBB in one row, CCCCC in one row, DDDDD in one row.

 

Please help me with this if it is possible.

 

Attached sample input & output

grazitti_sapna
17 - Castor

Hi @Gsiva3,

 

Here is my take on your problem.

 

grazitti_sapna_0-1609141643653.png

 

I hope it helps.

 

 

Sapna Gupta
Gsiva3
8 - Asteroid

Thank you so much @grazitti_sapna  

 

I have already got it.

 

I have one more request. I have a rows named 12,13,14 & MKT, in which MKT is alone empty.

 

Now what I want is IF Value in Count column is 4, I want to create 4 empty rows and copy the values of 12,13,14 to those four empty rows, but for the market row alone, since count is 4 in that row " values in that cells are AAAAA,BBBBB,CCCCC,DDDDD" I want these contents to be copied to the market column. My output should be like "IF value count column is 4, then I need 4 rows along the values for 4 rows in column 12,13,14 whereas for MKT column alone, in the generated 4 rows, I want AAAAA in one row, BBBB in one row, CCCCC in one row, DDDDD in one row.

 

Please help me with this if it is possible.

 

Attached sample input & output

AkimasaKajitani
17 - Castor
17 - Castor

Hi @Gsiva3 

 

This is my solution for you. It is a little complex workflow.

AkimasaKajitani_1-1609142419199.png

 

Labels