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

subtituting values of raws to columns

Faisalomran1
7 - Meteor

hello everyone .

 

so I have a problem in designing and im not sure if it is doable by using Alteryx.

picture of data sample.png

 in the data sample above each API number ( Second column ) is represented by more than one job start date (first column),the Chemical used ( CAS number, third column), percentage of the chemical used ( percent HFjob, 4th column), and the mass of ingredient used (mass ingredient, fifth column).

what I am trying to do is to make a column for each chemichal used ( CAS number), including only the written one ( not the numbers). the new columns will be; mass of chemical taken from ( mass ingredient ), and percentage of chemical taken from ( percentHFjob).

sorry for the complication.

your help will be much appreciated      

3 REPLIES 3
grossal
15 - Aurora
15 - Aurora

Hi @Faisalomran1,

 

I am not sure if I got the problem right (small sample data and desired output would be useful), but I will try my best.

 

"what I am trying to do is to make a column for each chemichal used ( CAS number), including only the written one ( not the numbers"

 

-> you can do this with a Filter Tool and a Regex-Expression (can be done in one or two steps)

-> make a column afterwards -> Cross Tab

 

Hope this helps a bit. 

 

Best

Alex

 

Faisalomran1
7 - Meteor

input:

job start dateAPI numberCAS numberpercent HFjobmassingredient
2018-01-091107200500001water333
2018-01-091107200500001

water

 

573358
2018-01-091107200500001proppant306520
2018-01-261107203940000gelling agent120
2018-01-261107203940000acid130
2018-01-261107203940000water403256
2017-02-14110720400000064742-47-8121
2017-02-141107204000000proppant2025

2017-02-14

110720400000064742-47-61

20

desired output

job start dateAPI numberwater massproppant massacid massgelling agent massproppant precentagewater precentageacid precentage 
2018-01-09110720050000133586520003060 (57+3)0 
2018-01-2611072039400003256030200401 
2017-02-141107204000000025002000 
grossal
15 - Aurora
15 - Aurora

Thanks for the sample @Faisalomran1.

 

Here is a way to do it: 

 

grossal_0-1585861473403.png

What happens:

1) Filter all CAS numbers with Text

2) Rename Columns to percentage / mass (needed for the output) (Select Tool)

3) Transpose to shift columns to rows

4) Formula for the required column names

5) Cross Tab to bring them back into the wanted shape

6) Multi Field Formula to clean up null values and replace them with 0

 

If the column order matters to you, you can use a select tool and change them. Workflow is attached. I hope I got it right.

 

 

Best 

Alex

Labels