Alteryx Designer Desktop Discussions

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

Formula to split data

SouravKayal
8 - Asteroid

Hi Team,

 

I have a data set as below:

 

IDTypeJan$Feb$Mar$April$Year$
1test200050001000900

8900

 

A Mapping table as below:

 

IDrecord NameRecord%
1abc30
1def30
1xyz40

 

The need is to use the mapping table and split the above table costs based on the percentage of the record. So the final data should be something like below after merging the two.:-

 

The cost gets split based on the record % of that row name. 

 

IDTypeRecord nameRecord %JanFebMarAprYear
1testabc3060015003002702670
1testdef3060015003002702670
1testxyz4080020004003603560
Total   2000500010009008900

 

Should we use the transpose tool before the join or how ? I am little confused here

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @SouravKayal 

 

You can achieve by using append tool to and multi-field formula tool

 

Use append tool to get values for all rows and multi-field formula tool to calculate percentage.

 

atcodedog05_0-1612251726074.png

 

Hope this helps 🙂 Feel to ask if you have any questions

SouravKayal
8 - Asteroid

This works for one record now if i have a data set of more than 100000 records, there has to be a join to pick the name and percentage for that ID right ?

atcodedog05
22 - Nova
22 - Nova

Hi @SouravKayal 

 

Yes thats right. It would be something like this and join on ID

atcodedog05_0-1612252559225.png

 

SouravKayal
8 - Asteroid

i tried this and I am getting more data than needed. if the mapping file has duplicates should we use a unique ?

SouravKayal
8 - Asteroid

my records are doubling so for a record with 10% i see 20

atcodedog05
22 - Nova
22 - Nova

Hi @SouravKayal 

 

Yes that right the key should be unique in at least one of the input or else it will cause one to many join and increase the numbers.

Labels