ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
GELÖST

Percentage formula on columns

Danah_mr
Meteoroid

Hi all,

 

I have the following Data and i need to Calculate the Material as % of DCC  row for each year (Total DCC/Total Material Cost) * 100) using Alteryx Designer. Can someone help me on how to apply this formula ?

 

Data:

Cost Element2020202120223 Yr Average
Total DCC$164,406,097$178,020,724$187,171,952$176,532,924
Total Material Cost$14,757,805$18,857,448$22,690,419$18,768,557

 

Desired Output:

Cost Element2020202120223 Yr Average
Total DCC$164,406,097$178,020,724$187,171,952$176,532,924
Total Material Cost$14,757,805$18,857,448$22,690,419$18,768,557
Material as % of DCC9%11%12%11%

 

Thanks!

7 ANTWORTEN 7
Qiu
21 - Polaris
21 - Polaris

@Danah_mr 
A quick sample can be something like this.

A lot of Tanspose and Cross Tab 😁

0305-Danah_mr.png

Danah_mr
Meteoroid

thank you ! 

the Tanspose and Cross Tab is a magic  ✔️

Danah_mr
Meteoroid

.

Danah_mr
Meteoroid

@Qiu 

what about applying a formula with a total same as the example below?

 

 % of OT formula (A Total /(A Total + B Total)) *100 and (B Total /(A Total + B Total)) *100

Cost ElementActualPlan% Var% of OT
A Total19,693,57319,759,044-0.33%99%
1) A13,416,50814,438,782-7.08%
2) A6,277,0655,320,26317.98%
B Total146,7770 1%
1) A2,1630 
2) A144,6140 
flying008
Aurora

Hi, @Danah_mr 

 

1- If use Macro of Excel-Transpose function in gallery,  the case will so easy.

录制_2024_03_05_14_55_55_996.gif

 

2- Sum the total then calculation %, will get your want.

 

录制_2024_03_05_14_56_36_83.gif

 

 

Danah_mr
Meteoroid

could you please share the Workflow you used on 2- Sum the total then calculation % ? i need to see the configration and sitting of the Append tool

 

Thank you @flying008 

flying008
Aurora

Hi, @Danah_mr 

 

The append tool don't need any setting for additional,  if you have other questions, let me know.

Beschriftungen
Top-Lösungs-Autoren