Percent of Total - How to build report

zico8

Board Regular
Joined
Jul 13, 2015
Messages
225
Hi,

I have some task - that looks like very easy, but... I cannot find solution :(

I have data like this:
Column1Column2
ANo
AYes
ANo
BNo
BYes
CYes
CYes
CNo

<tbody>
</tbody>

And want to get report showing the percent of Yes/Total:

Column1Yes/Total
A33,33%
B50,00%
C66,67%

<tbody>
</tbody>

How to build that?
Does Pivot Table do this? Or I need some transformation in PowerQuery?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Would this be any use?
Formula in E2 is copied down.

Excel Workbook
ABCDE
1Column1Column2
2ANoA33.33%
3AYesB50.00%
4ANoC66.67%
5BNo
6BYes
7CYes
8CYes
9CNo
10
% Yes
 
Upvote 0
The result is OK but I am looking for some solution that I can create that report automatically in the gentle way - no matter how many data I have in my table.
More advanced sample thet need to be solved too is to have two parameters for each record of my table, like:

Column1Column2Column3
AXNo
AXYes
AYNo
BYNo
BXYes
CYYes
CYYes
CYNo

<tbody>
</tbody>

with result:
X (Yes/Total)Y (Yes/Total)
A50,00%0,00%
B100,00%0,00%
C66,67%

<tbody>
</tbody>


so... I think that should be some solution to do this with PT
 
Upvote 0
Hi,

I have found that if I change each "Yes" to 1, and each "No" to 0 - creating these reports will be very easy in Pivot Table.
But is there any way to do it?
 
Upvote 0
Hi,

I have found that if I change each "Yes" to 1, and each "No" to 0 - creating these reports will be very easy in Pivot Table.
But is there any way to do it?

You can pull the yes/no column into your pivot table (column) and then compute the column percentage.

XBcY5JN.jpg
 
Upvote 0
archangel99 - what you added to each field?
Rows: 'Header1';
Columns: 'Header2', 'Y/N';
Values: ??
 
Upvote 0
But the result is different and incorrect.
Please see B+X. We have only YES, so the result for YES should be 100%
 
Last edited:
Upvote 0
Again this is without a PT, but see if any use.

Data in columns A:C is made into a formal table ('Table1' for me). This allows automatic expansion/contraction of the results.
Formula in E2 is copied down as far as you might ever need.
Formula in F2 is copied across and down as far as the column E formulas.

Excel Workbook
ABCDEFG
1DataX/YY/NXY
2AXNoA,$E2,Table1:],F$1,Table1:],&quot;Yes&quot;)/COUNTIFS(Table1:],$E2,Table1:],F$1),&quot;&quot;)]50.00%0.00%
3AXYesB100.00%0.00%
4AYNoC66.67%
5BYNo
6BXYes
7CYYes
8CYYes
9CYNo
10
11
% of Total
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,487
Members
448,967
Latest member
visheshkotha

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