Alteryx Designer Desktop Discussions

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

Adding Row to Data Based on a Formula

thenning
7 - Meteor

Hello everyone,

 

I'm currently working on a workflow where I want to add a row of data based on a formula calculation of 2 of the other rows.  Can anyone assist me with how to set up?

 

An example is as follows:

 

MeasureApril 2019
Rxs8,000,000

Eligible Members

7,000,000
Utilizing Members2,000,000

 

I want to add 2 rows:

 

MeasureApril 2019
Rx per Eligible Members1.14 (Rxs/Eligible Members)
Rx per Utilizing Members4 (Rxs/Utilizing Members)

 

Thanks!

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @thenning 

 

I don't know if this is exactly what you're looking for, but it's a way of doing it.

 

SolutionExample.PNG

 

- Use Multi-Field Formula to convert your numbers to Double type, and replace all comma separators

- Use Filter to split "Rxs" measure from all the others

- Append Fields tool to put the other measures side by side with Rx measure

- Formula Tool to create the new measure (Rxs per...) and to divide one by another

 

WF attached.

 

Cheers,

afv2688
16 - Nebula
16 - Nebula

Hello @thenning ,

 

hope this helps!

 

Untitled.png

 

Cheers

 

 

Matt_Curtis
9 - Comet

If you're simply looking to add those two result records to your original data set, then the Union tool will be all you need.  Feed both inputs into the Union, and it'll stack that data on top of each other.  Use the same field names to make it easy, or manually align the fields in the config of the Union tool.  If you want to add those data points as fields, with values in every row of your original input, then use the Append Fields as described above.

Labels