Alteryx Designer Desktop Discussions

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

Column headers names to cell values

Stelios
5 - Atom

Hello everybody,

 

I hope that this is the correct place to put my question as this is my first time posting.

 

I have a situation where the columns headers names represent the percentage of which the values of the columns need to be applied with.

Eventually, I want to create a new column with the sum of those columns after the data of them have been multiplied with the corresponding percentage. As the example below. The other thing is that while the data format and structure that I am receiving is consistent, is changing dynamically per week, so next week the columns headers names will change. 

 

Any help will be much appreciated.

Thank you very much. 

 

Example1.PNG

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Stelios 

Dynamic as you request😁

0130-Stelios.PNG

danilang
19 - Altair
19 - Altair

Hi @Stelios 

 

Here's a completely different way to accomplish the same thing

 

w.png

It uses the Dynamic Replace tool which has a special mode to allow it to treat the values coming into the R input as formulas and evaluate them placing the result in a field.

 

The bottom branch here builds up the final formula to be evaluated by first building the formula for each Percent column and then concatenating the results into a single string.

 

The results are the same as the excellent solution provided by @Qiu without requiring the transpose, join and summarize tools

danilang_1-1612020852449.png

 

Dan

Stelios
5 - Atom

Thank you very very much guys, both solutions seems to be working perfectly fine.

Labels