Hello All,
Could you please help me figure out how can I perform the following calculation in Alteryx?
My original data set looks like this:
ID | A | B | C | D | Total |
ID1 | 5 | 10 | 3 | 2 | 20 |
ID2 | 4 | 7 | 8 | 11 | 30 |
ID3 | 14 | 20 | 33 | 2 | 69 |
ID4 | 6 | 2 | 33 | 1 | 42 |
ID5 | 5 | 7 | 3 | 3 | 18 |
I'd like to calculate the percentage of row total in each cell to get this outcome:
ID1[A] = 5/20 | ID1[B] = 10/20 etc...
Desired outcome:
ID | A | B | C | D | Total |
ID1 | 0.25 | 0.5 | 0.15 | 0.1 | 1 |
ID2 | 0.13 | 0.23 | 0.27 | 0.37 | 1 |
ID3 | 0.2 | 0.29 | 0.48 | 0.03 | 1 |
ID4 | 0.14 | 0.05 | 0.79 | 0.02 | 1 |
ID5 | 0.28 | 0.39 | 0.17 | 0.17 | 1 |
Thank you!
Solved! Go to Solution.
@karolyb one way of doing this
multi-field formula. select all of your non-total numeric fields.
select change type to double (or fixed decimal).
unclick new (unless you want to keep the raw data)
[_CurrentField_]/[Total] in formula.
@apathetichell
Nice use with Multi-Field Formula tool😁
Thank you for the solutions!