difab
difab

Reputation: 79

Percentage of Parent Total in Google Sheets Pivot Table

I'm trying to find the percentage of the parent/category total in the below Pivot table. I manually calculated Column E to show what data I would like the Pivot table to return. Basically, I am looking for it to calculate the total percentage of each drink in a category based on the total number of drinks sold within that category.

Is this possible to do in Pivot Tables in Google Sheets? I know Excel has a % of Parent Total value but it doesn't seem like that is an option in GSheets. Is there is a custom calculated field that could be a work around for this?

enter image description here

Upvotes: 3

Views: 3648

Answers (1)

player0
player0

Reputation: 1

try:

={"Percent of Category"; INDEX(IFNA(C6:C/VLOOKUP(A6:A, 
 SUBSTITUTE(FILTER({A6:A, C6:C}, REGEXMATCH(A6:A, "Total")), " Total", ), 2, 0)))}

enter image description here

Upvotes: 1

Related Questions