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

Creating calculated columns based on headings

Arunima_S
7 - Meteor

Hello,

 

I have an alteryx problem, where I am trying to create new calculated fields("Cal.") based on the column headers of the data. There are essentially 4 header rows. 

 

OrderNYTXFLOKNJAR  
Label1AABBCC  
Label2 TableDeskDeskTableDeskTable(cal.)Desk(Cal.)
Label3SKSPCTCTCRAE  
1232035100685010085268
4562036150686020096418
5672037906870300107458
89020381706880400118638
45620391006890500129668

 

Here, Table(Cal.) = 35+50 = 85 and so on

Desk (Cal.) = 100+68+100= 268 and so on

 

Is there any way I can create these fields where alteyrx will calculate the sum of amounts based on "Label2"?

 

Help is greatly appreciated!

 

Thank you,

Aria

5 REPLIES 5
ImadZidan
12 - Quasar

Hello @Arunima_S ,

 

Idea you may find helpful.

Arunima_S
7 - Meteor

@ImadZidan ,

 

Thanks for sharing the idea. However, I am looking for a dynamic approach. There are over 1000 fields and I really don't know how many fields have "table" or "Desk", to get the "f1,f2s". Is there a way to dynamically have it identify the header and then summarize the values?

 

Something like- If header= "Table" then add all the corresponding values to Table_Calc

 

Thank you

ImadZidan
12 - Quasar

Hello @Arunima_S ,

 

Another idea.

 

DavidP
17 - Castor
17 - Castor

Hi @Arunima_S 

 

How about something like this?

 

DavidP_0-1598481546693.png

 

ImadZidan
12 - Quasar

@DavidP ,

 

I like your solution better.

 

I thought there must be another better way.

Labels
Top Solution Authors