Alteryx Designer Desktop Discussions

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

Add New Column after Existing Column

fikrizahari
8 - Asteroid

Hi,

Greetings !

I would like to create another columns after existing table, based on value written by user.
I understand that the value can be input via 'Text Box' tools, but I have difficulties to sort back the column sequence.

For example, user input 'cost centre' : 123001-AB
If its match with any 'cost centre', it require to create another column on the right side ( only require for non-zero column ). 

Input data :

Cost CentreBasic SalaryHouse AllowanceCar AllowancePhone Allowance
154001-DE5000400500100
123001-AB4000300 100
123001-ZY3000 500100
154001-KU2000300500100



Desired output :

Cost CentreBasic SalaryBasic Salary - 123001-ABHouse AllowanceHouse Allowance - 123001-ABCar AllowancePhone AllowancePhone Allowance - 123001-AB
154001-DE5000 400 500100 
123001-AB 4000 300  100
123001-ZY3000   500100 
154001-KU2000 300 500100 



The main issue is the column sequence is not on any sorting order.
Thank you in advance !

6 REPLIES 6
Pang_Hee_Choy
12 - Quasar

you can transpose everything first, then crosstab it again.

 

open via edit or from designer

 

 

Pang_Hee_Choy_0-1681190510505.png

 

Yoshiro_Fujimori
15 - Aurora

Hi @fikrizahari ,

It may not be exactly match with your requirement,

but I would do this way as I prefer keeping the original table format.

Please take this as another approach.

 

Workflow

Yoshiro_Fujimori_0-1681191137837.png

Output

Yoshiro_Fujimori_1-1681191380503.png

 

Yoshiro_Fujimori
15 - Aurora

I converted the Workflow to an APP with Drop Down List. (Just for curiosity😀)

 

Workflow

Not sure if the Block Until Done tool actually works. It may be necessary to run it twice.

Yoshiro_Fujimori_0-1681192184728.png

APP Interface

Yoshiro_Fujimori_1-1681192227199.png

APP Output

Yoshiro_Fujimori_2-1681192272212.png

 

fikrizahari
8 - Asteroid

Hi @Pang_Hee_Choy 

It worked !

I would like to ask :

1) May i know the reason to change data type ? Is that mandatory ?

fikrizahari_0-1681194973466.png



2) How do you set the cost centre '123001-AB' on the text box tool ?
and how do i change if i want to test with other cost centre ?

Pang_Hee_Choy
12 - Quasar

 

1. type is not necessary, but the size yes.

bug for text input, always keep lowest data type. 

before only 15, not enough character for adding cost center behind.  

 

2. it an application format, good to implement as users need not have knowledge to alteryx.

 

when you double click the file in folder, it will pop out this. (provided alteryx designer)

Pang_Hee_Choy_1-1681196604572.png

so users only need to fill-in certain criteria and get their required result (via the output file)

*user cant see the result window, so you need to have output tool to let user check result via the excel file (for example).

 

 

 

you can learn it in interactive lessons

Help Doc link: Analytic Apps | Alteryx Help

fikrizahari
8 - Asteroid

Hi @Pang_Hee_Choy 

Thank you for your answers and suggestions.
It is the solution that I am looking for, appreciate it !


Hi @Yoshiro_Fujimori 

Thank you for your answer, its really helpful and gave me another idea.
I also has combined the drop down list that you mentioned, into my workflow. 😆

However, I would like to combine the table instead of make it separate.
It is fine, since Pang Hee Choy already gave me the solution above.

Labels