Calculate ratios within a pivot table

RyanP

New Member
Joined
Mar 12, 2010
Messages
7
I have a pivot table that has a category column field (with categories of 15, 25, 45, and 65), a Status field (High, Medium, Low), and a Code field (X1, Y1, Z1, L1, etc.). The codes always match up to the same status (so L1 is always Medium, for example), so that data is somewhat redundant. At the intersection is simply a sum of values. So the table would look like this:

Category​
15254565
Status​
HighHighMedLowMedLowMed
Code​
X1Z1L1P1Y1J1L1
Row13281891
Row21345001
Row32001650

<tbody>
</tbody>

What I need to do that is calculate at the category level a ratio of (sum of all non-Low numbers) / (total of all status numbers for that category). So for Category 15, the ratio would be 3 / 3 (or 100%), because there are no Lows. For Category 25, it would be (2+8)/(2+8+1), or 10/11, or 91%. In essence it's just telling us for each category what the success level of that row is (a success being non-Low). For Category 45 it would be 8 / (8 + 9), or 8/17, and so on.

I'm really struggling with how to make this happen in a pivot table. I tried a calculated item, and it locked up Excel. I'd love to do a calculated field or formula, but I'm not sure how to do that, as it almost has to be like a SUMIF to check for the Low. Any suggestions?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,376
Messages
6,124,593
Members
449,174
Latest member
chandan4057

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