Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Summarize by two different fields in orden to add a share % column

Hi all!


I've been struggling with a workflow; I have a table wich contains names and devices:




I need to calculate the share for each device and campaign, like this:




I'm doing it using some Summarize tools and a formula and then joining them, since Camp Name are different, there is no problem to summarize them, but they share the same Devices, so the summarize step group by the total devices, not for campaign and then by device; after the formula the result goes like this:




I'm working with a workflow like this:



It worked in a previous task where the second field was unique.


Any help?


Thanks in advance.

Alteryx Partner

Hi @sergonza1 


I suggest having 2 summarises coming from your input.


For one of them, you want to group by Camp and Device, but sum the impression (and rename the output field name as Total Device).


For the 2nd summarise, you want the total impression for each camp, so group by Camp and Sum Impression (and rename it Total Campaign).


Then join everything back on Camp, and use a formula tool to calculate the percentage.


I have attached my workflow below for you. I didn't input all of LeCamp 2 manually, but you can follow for LeCamp.


Hope this helped :)


- Andrew

Awesome!, This worked for me.