Calculate row % by subgroup in pivot table

akswartz85

New Member
Joined
Mar 31, 2010
Messages
49
How do I calculate row percentage by subgroup within a pivot table?

<style type="text/css"><!--br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 178px"><col width="171"><col width="152"><col width="112"><col width="58"><col width="152"><col width="112"><col width="100"><col width="100"><col width="100"><col width="100"></colgroup><tbody>[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "]COUNT of diploma_ontime[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "]diploma_ontime[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "]s_male[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "]0 Total[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "] Total[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "]1 Total[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "]Grand Total[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "]hs_name1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]0[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] , align: right"]1[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=666666]#666666[/URL] "][/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Hope High School[/TD]
[TD="align: right"]0.7%[/TD]
[TD="align: right"]1.1%[/TD]
[TD="align: right"]1.8%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]51.8%[/TD]
[TD="align: right"]46.4%[/TD]
[TD="align: right"]98.2%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]James High School[/TD]
[TD="align: right"]0.7%[/TD]
[TD="align: right"]1.7%[/TD]
[TD="align: right"]2.3%[/TD]
[TD][/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]52.1%[/TD]
[TD="align: right"]45.6%[/TD]
[TD="align: right"]97.7%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Juniper High School[/TD]
[TD="align: right"]0.6%[/TD]
[TD="align: right"]2.2%[/TD]
[TD="align: right"]2.8%[/TD]
[TD="align: right"]0.0%[/TD]
[TD][/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]52.8%[/TD]
[TD="align: right"]44.4%[/TD]
[TD="align: right"]97.2%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Kennedy High School[/TD]
[TD="align: right"]1.3%[/TD]
[TD="align: right"]3.1%[/TD]
[TD="align: right"]4.3%[/TD]
[TD][/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]55.6%[/TD]
[TD="align: right"]40.0%[/TD]
[TD="align: right"]95.7%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]King High School[/TD]
[TD="align: right"]0.9%[/TD]
[TD="align: right"]2.4%[/TD]
[TD="align: right"]3.4%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]50.7%[/TD]
[TD="align: right"]46.0%[/TD]
[TD="align: right"]96.6%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Lincoln High School[/TD]
[TD="align: right"]0.6%[/TD]
[TD="align: right"]0.5%[/TD]
[TD="align: right"]1.1%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]55.3%[/TD]
[TD="align: right"]43.6%[/TD]
[TD="align: right"]98.9%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Meadowbrook High School[/TD]
[TD="align: right"]1.4%[/TD]
[TD="align: right"]1.6%[/TD]
[TD="align: right"]3.0%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]50.2%[/TD]
[TD="align: right"]46.8%[/TD]
[TD="align: right"]97.0%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]North Falls High School[/TD]
[TD="align: right"]0.5%[/TD]
[TD="align: right"]1.1%[/TD]
[TD="align: right"]1.6%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]50.6%[/TD]
[TD="align: right"]47.7%[/TD]
[TD="align: right"]98.4%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Orange High School[/TD]
[TD="align: right"]0.5%[/TD]
[TD="align: right"]1.4%[/TD]
[TD="align: right"]1.9%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]50.9%[/TD]
[TD="align: right"]47.3%[/TD]
[TD="align: right"]98.1%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Polk High School[/TD]
[TD="align: right"]0.9%[/TD]
[TD="align: right"]1.2%[/TD]
[TD="align: right"]2.2%[/TD]
[TD][/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]52.2%[/TD]
[TD="align: right"]45.6%[/TD]
[TD="align: right"]97.8%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]South Falls High School[/TD]
[TD="align: right"]0.2%[/TD]
[TD="align: right"]1.4%[/TD]
[TD="align: right"]1.6%[/TD]
[TD][/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]51.3%[/TD]
[TD="align: right"]47.2%[/TD]
[TD="align: right"]98.4%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Upper Hills High School[/TD]
[TD="align: right"]1.7%[/TD]
[TD="align: right"]2.2%[/TD]
[TD="align: right"]3.9%[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]56.8%[/TD]
[TD="align: right"]39.4%[/TD]
[TD="align: right"]96.1%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: #f3f3f3"]Washington High School[/TD]
[TD="align: right"]0.9%[/TD]
[TD="align: right"]1.0%[/TD]
[TD="align: right"]1.9%[/TD]
[TD][/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]0.0%[/TD]
[TD="align: right"]53.7%[/TD]
[TD="align: right"]44.3%[/TD]
[TD="align: right"]98.1%[/TD]
[TD="align: right"]100.0%[/TD]
[/TR]
[TR]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] "]Grand Total[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]0.8%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]1.5%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]2.3%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]0.0%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]0.0%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]0.0%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]52.4%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]45.4%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]97.7%[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=d9d9d9]#d9d9d9[/URL] , align: right"]100.0%
[/TD]
[/TR]
</tbody>[/TABLE]


Right now, it is calculating the percentage by the total row, but I want it totaled by the subgroup (i.e. by the total diplomal_ontime= 0 and then diploma_ontime = 1).

Is that possible?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top