community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Query on Grouping and Sum/Percentage

Atom

Hello

I have a query regarding the Group BY and Sum/Percentage calculation.

Scenario : I have a column having 100 values. The values can be First/Mid/Last. Now when I want to calulate the percentage of each of these values in the column, I can easily do that using Group By on the same column and then the Count of Each value divided by the total count of values.

The problem I am facing right now is, I have atleast 50 such column with same set of values (viz, First, Mid and Last). I want percentage of each value in the entire colulmn and I want to do it for all 50 columns. I dont want to do the same process for 50 different columns.

Is there any way to do it in the same node or any shorter process for that.

Appreciate the help !!

Regards
MG

Yes it is possible.


You can use a transpose tool to convert it so that field name becomes a column.

Then use a summarise to group and compute for each field in one pass.

Finally, a cross tab tool will put it back so each sum/pct is a column again.

 

Simple demo attached to show what I mean

Labels