Is there a way to average all the row values of a pivot and place it on the grand total? - excel-formula

I need to average the November, December and January row values of a pivot and placed it on the grand total.

Related

Showing percent difference in values in excel

I have a table and in Column 1 is a list of companies, and company names may appear more than once because Column 2 is a year. Column 3 is the amount a company spent in that respective year. How can I show the percent differences between each year without spilling into the next company? For instance Company, A is 2017-2020 and i want to show the % growth for that. But the next row is Company B for 2017-2020 and I don't want to calculate the % between the values for 2020 Company A and 2017 Company B.
To calculate the % between the values for different companies:
Sort the data by company.
Find the percentage of the amount. Select the cell. Click Home > Number Format > Percentage. Enter the formula in cell C2: =B2/A2.
Find the percentage of change between two amounts. Select the cell. Click Home > Number Format > Percentage. In cell B3, divide the company A's second year’s sales by the first year, and then subtract 1, or enter the formula in cell C3. =(B2/A2)-1.
Read more about calculating percentages at support.microsoft.com.
Hope it helps, Please upvote!
You can use a Pivot Table for this:
As you can see, Company A invested 1000 on 2017 and 2000 on 2018. So 2000-1000=1000 and '1000 / 2017 investment (which is 1000)= 100%'
Company A invested 3000 on 2019 and 2000 on 2018. So 3000-2000=1000 and '1000 / 2018 investment (which is 2000)= 50%'
And so on.
About Pivot Tables, check:
Create a PivotTable to analyze worksheet data
My setup in Pivot Table is:
Field Company into rows section
Field Year into Columns Section
Field 'Amount' into Values section
IMPORTANT: Field Amount must change setup. Change option show values as and choose % difference with previous year

maxifs and averagesif for data on certain dates

I have a table with names in column B and dates in row 1. The rest of the tables is the sales amount for the employee listed in column B on the date in row 1.
I want to find the max and the average for certain days. For example we have 12 sales on various days a quarter. I want to be able to find the max sales amount on days days that we had sales, and the days we didn't have sales as well as the averages sales amount on the days we had sales and the days we didn't have sales.
Something like this. I can find the row that the data is in using match: =MATCH(A2,data!B:B,0) I can find the if is a sale using max and maxifs in an arrary: {=MAX(MAXIFS(data!$C2:$N2,data!$C$1:$N$1,report!$M$1:$P$1))} or using =AGGREGATE(14,4,MAXIFS(data!$C2:$N2,data!$C$1:$N$1,report!$M$1:$P$1),1)
There is a problem with finding the max if it is not a sale. I am not sure why. I tried: =AGGREGATE(14,4,MAXIFS(data!$C2:$N2,data!$C$1:$N$1,"<>"&report!$M$1:$P$1),1) & {=MAX(MAXIFS(data!$C2:$N2,data!$C$1:$N$1,"<>"&report!$M$1:$P$1))}
I can find the average if it is a sale if there is data for every day, but not if there is data missing. Then I get a #DIV/0 error.
I think there are 2 issues.
1) the "<>"&report!$M$1:$P$1 is not working for an array of dates
2) The average doesn't like it if there is not a number in the cell
Does anyone have any ideas on these?

Deleted columns should not affect the summation values in excel?

Here, I am using the month wise report from January to December and I had the grand total column. Each month wise report consists of five columns named age, gender, code, education code and area code. All the data is in binary. Using the summation formula, I added the totals in the grand total. Now, I need to get only few months report. For that, I deleted the other months and its showing a #REF in the grand total.
If I take only first column in the grand total, its summation looks like =SUM(B4,I4,P4,W4,AD4,AK4,AR4,AY4).
Can any one suggest how to do this using OFFSET or any other formula in Excel?
I would recommend a SUMIF:
When you put in single cell values like that deletion will cause errors.
Have you tried:
=Sumif(B1:zz1,"AGE",B4:zz4)?
I arbitrarily assumed column labels are in row 1 and the data doesn't extend past column ZZ.
In the future I would recommend using a table and filtering by month rather than deleting data.

Correct Grand Total in Pivot Using Calculated Field

I have an excel pivot table which looks like
Date Sum of DURATION Capped Daily Total
03-Jan 9.5 8.0
04-Jan 6.0 6.0
05-Jan 10.5 8.0
06-Jan 4.5 4.5
Grand Total 30.5 8.0
As you can see, the Grand Total for Capped Daily Total is incorrect.
In this example:
Date column is added as a Row and comes from source data. It has been Grouped By: Days
Sum of DURATION is added in the Values section and comes from the source data.
Capped Daily Total is a computed field. The formula used is = MIN('DURATION', 8)
When calculating the grand total it appears that excel has computed the Grand Total and then used the formula = MIN('DURATION (HOURS)', 8) to cap it to 8 hours. I don't want the formula to apply to the Grand Total - only to the rows. The grand total should be a simple SUM formula.
How can I achieve this requirement in Excel?
This is a issue with pivot tables see link. To get around this you can add the Daily Capped Total formula to you table itself instead of the pivot table and the field will calculate correctly.
Another solution to get the total would be to place a formula outside the pivottable and sum the column minus the grand total.
=SUM(G:G)-GETPIVOTDATA("Sum of Daily Capped Total",$E$1)
Based off you description of the raw data you could use this formula. It looks for the first occurrence of the date in the range and if it matches the current row number it will sum and min to get your requirement.
=IF(MATCH(A2,$A$2:$A$15,0)=ROW()-1,MIN(SUMIF($A$2:$A$15,A2,$B$2:$B$15),8),0)

Excel 2010 Pivot Tables - Subtotal as an Average of Sums

I have a pivot table that takes a resources % utilisation each month for each project they are on, shows it as a SUM, and sumarises by what department they are in. This looks like:
Jan-15 Feb-15
Department Subtotal Subtotal
Joe Bloggs 20% 10%
Fredd Bloggs 60% 30%
I want the Subtotal for Department to show the AVERAGE of the percentages shown in the pivot table (so above it would be 40% for Jan-15 and 20% for Feb-15). However, if I select the format as AVERAGE, it returns the AVERAGE of all the data behind the pivot table, which gives me different figures as each person may be working on several projects.
Is there any way I can get the Subtotal to calculate differently?
Thanks.

Resources