Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Replace the amount with the precentage.

phoebe_90
8 - Asteroid

step1

Figure out the percentage of the Amount in local currency in each row to the amount with the same Document Number and tax code as this row.

step2

Replace the value of Amount in local currency with the percentage.

For example

Transfer sheet1 to sheet2

sheet1

Document NumberAccountAmount in local currencyTax Code
1900049866020000823.88J1
19000498660200007.55J2
1900047166020000141.51J2
19000471660200001472.56J1
19000477650100005856.6J2
19000477650100005856.6J2
19000477650100005977.36J2
19000477650400002895.53J1

sheet2

Document NumberAccountAmount in local currencyTax Code
190004986602000099%J1
19000498660200001%J2
19000471660200009%J2
190004716602000091%J1
190004776501000028%J2
190004776501000028%J2
190004776501000029%J2
190004776504000014%J1
2 REPLIES 2
martinding
13 - Pulsar

Hi @phoebe_90 ,

 

  1. You can use the Summarize Tool to group by on [Document Number], and Sum up the [Amount in local currency]
  2. Then use the Join Tool to join the Summarized part with the original data, join on Document Number, keep only the Summed value.
  3. Use the Formula Tool, and divide the original [Amount in local currency] by Summed value * 100. You can use ToString([Amount in local currency]/[Sum_Amount in local currency]) * 100) +"%" to get your desired format.

 

Yoshiro_Fujimori
15 - Aurora

@phoebe_90 ,

At step 3 of @martinding , you may need to change the data type to string, to add "%" to the number.

Yoshiro_Fujimori_0-1680008079524.png

 

Labels