Pivot table calculation of counted columns - pivot

i tried to find one solution to this with no success
I have this pivot table
Count of Sale
Count of returns
4
1
3
0
and i want a third colum of the Return Percentage (Count of returns/count of sales) but i cannot find a way anywhere of how to do it, trying show values as % doesnt work as addded a calculated field neither

Related

Excel VBA macro create new value from 2 entire column

I need to sort values from an entire column.
I do have one column city which have different values of 0 or 1 ( 0% and 100% )
There are 90 000 rows.
I'll need to do a percentage by compiling the values of 0 and 1 by doing the average
I want that value to appear in the column I
Like what I want is that:
You can use AVERAGEIF combined with IF
Function
AVERAGEIF
My fake data:
My formula at C2 (and drag down)
=IF(A2=A1;"";AVERAGEIF($A$2:$A$13;A2;$B$2:$B$13))
Anyways, I would suggest to use indeed Pivot Tables:
Create a PivotTable to analyze worksheet
data
With Pivot Tables, you could group your data using cities field, and then calculate the average easily, and just 1 single row per city instead of those empty rows

How to skip counting same value set in 2 columns that appears in another 2 columns set

Good day, I need some help on how to form an Excel formula to count distinct for values in 2 columns with other columns:
I want to count a number of subjects assigned to "ummu", but that same subject name appears again shouldn't be count. In this example, the count will return 4. How can I achieve this using excel formula?

% of Row Total in pivot table

I'm trying to format my pivot table values as percentages of their row totals (in my data, each quarter). However, when I select Show Values as % of Row Total, it gives each value 100%.
When I try Show Values as % of Parent Row Total, it uses the column as the total and uses the first 4 quarters of 2017 as % total of 2018, not at all what I want to do.
Here is my current pivot table
Here is how I'm trying to format the same pivot table
I didn't type all your "types" (or whatever is in the columns), but when I summarize by % of Row Total, it works as expected.
Is yours set up differently than what I show?
Update
If your data points are all separate columns as #jeffreyweir suggests, then you can't summarize them how you want using pivot table features. You'll have to add some columns to your data
Each Pct column is a formula:
=[#Replacement]/SUM(tbldata[#[Replacement]:[DTK]])
=[#Refund]/SUM(tbldata[#[Replacement]:[DTK]])
=[#Parts]/SUM(tbldata[#[Replacement]:[DTK]])
=[#DTK]/SUM(tbldata[#[Replacement]:[DTK]])
Then you can sum those in a pivot table.

Sumproduct using 2 criterias and on filtered values

I have the following source table
Date | fruit | veg
The user has previously filtered the date by month. In another table, I want to count the number of apples and tomatoes for example. To remove the invisible rows I use the SUBTOTAL function as
=(SUBTOTAL(102;OFFSET(limiter;ROW(limiter)-MIN(ROW(limiter));;1;1)))
where 'limiter' is the date range.
Then to count the number of apples in the fruit column , I use
= SUMPRODUCT(SUBTOTAL(102;OFFSET(limiter;ROW(limiter)-MIN(ROW(limiter));;1;1)) * Table!fruit = "apple"
and it works fine.
But, if I want to add in the vegetables criteria along with the fruit, the result is 0. I tried doing the sumproduct of fruit and veg first and then add the subtotal function but it gave a huge number.
Have you considered using a pivot table? (I strongly recommend you to)
Go to a new tab, select A1 and insert, new pivot table. You can put the fruit field in the column (probably row labels - my excel is in Portuguese =/). You would instantly have a table containing as first colum the list of existing fruits.
Then add the date to the body (probably values) of the pivot table and certify the type of value shown is count.
You would intantly get the count of all fruits.
The great advantage is that you can play around with this table as easily as dragging and dropping fields in columns, rows and body/values and instantly getting the results you want without having to figure out any formula issues.
Pivot tables also allow you to filter not only the date, but any other fields you wish.

ABS(column) not working in Excel PivotTable Grand Total

I have a Pivot Table in Excel with a Calculated Field but the Grand Total in the Pivot table doesn't seem to work as you would expect.
You would think that the Grand Total for Column Sum of abs value is the Total of the cells in the column....
abs(1) + abs(3) = 4
IE, the should be column
But it seems to be ignoring that column's cells and using the data source column [value] or the Sum of value column ...
abs(1 + -3) = 2
Calculated Field :=
abs value = ABS(value)
pivot table
level Sum of value Sum of abs value should be (not currently part of the pivot table)
a 1 1 1
b -3 3 3
-------------------------------------------- -----
Grand -2 2 4
Total
I found this incredibly old knowledge article: KB211470 Calculated field returns incorrect grand total in Excel. But, it has no work around.
I can't make modifications to the raw data and I'd like a solution that works with-in the Pivot Table. I'm happy to use DAX/PowerPivot as well. (The results are the same there by the way so it seems the cause is in how the Pivot table works.)
Am I doing something wrong?
Thank you.

Resources