Pivot Table Excel Grand Total Shows the Sum of Unformulated Calculated Field Value - excel

I tried a simple data table,
Table 1
ITEM
TARGET
A
150
B
150
Table 2
ITEM
PROD_QTY
A
160
B
120
I append both of the tables and create a Pivot Table, then use calculated field to see the outstanding by using these formula:
=IF(TARGET-PROD_QTY<=0;0;TARGET-PROD_QTY)
It worked well with the sum of outstanding, but when I was see the grand total, it shows like this:
ITEM
SUM OF OUTSTANDING
A
0
B
30
Grand Total
20
Is there anything that I could do to fix the grand total?
Cause I think the Grand Total is ignoring the =IF function in Calculated field and just go straight to the calculation

Related

Pivot Table Sum Items, But Average Grand Total

I have a Standard Pivot Table it has Date from the Columns and Numbers in the Value,
Column: Date | Numbers
I want the Numbers in the Rows to be Calculated as Sum, but I want the Grand Total to Average those Sums Rows
How is this possible?
Assuming you have PowerPivot, which you should if you have 2016, and assuming a table called Table1 loaded into the data model, you can add a measure for the sum, called say TotalNumber, which is just:
=SUM(Table1[Numbers])
Then add another measure which is the one you'll use in the pivot table:
=IF(HASONEVALUE(Table1[Date]),[TotalNumber],averagex(VALUES(Table1[Date]),Table1[TotalNumber]))

% 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.

How to sum the bottom value of a column that changes size?

So I'm tracking some investments in excel and the columns of interest are the total value of investments, the value for each investment, date. I have a formula for the net total to the side and I'm using this to manually type the net total into the column. I'm also using this data to create graphs of value vs date.
How can I change this formula so it will always just add up the final values for the total of each investments? I dont want to have to manually fudge the formula everytime I update the tables.
I want to do this because the table is a bit busy due to the data needed for the graphs, it'd be nice just to have the net total by the side and highlighted.
net total date 1 2 3
111 13/01/18 100 10 1 Net total: `Sum(c2, d2, e2)`
121 14/01/18 100 20 1
So I want the net total to just sum the bottom values for columns titled 1, 2, 3. I want it to be dynamic so i can then just type in the net total into the correct column and i can update all the graphs. But also want the net total to be on the side for easy viewing too instead of it getting lost in the raw data
there is a trick using "lookup()":
search(999999;A:A) returns value equals to 999999 or last value if 999999 is greater than every values. So your formula will be:
Net total: "lookup(999999999;C:C)+lookup(999999999;D:D)+lookup(999999999;E:E)"
(assuming none of the values is greatrer than 999999999)
Will the final value from each column always be the same row? If so then this formula will sum the last row in columns B, C and D by finding the last number in column B
=SUM(INDEX(B:D,MATCH(99^99,B:B),0))

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.

Issue with Excel Pivot Table Subtotals / Row Hierarchy

I currently have a pivot table with three row labels. The data in the row labels is grouped as follows:
Customer SKU Grouping YTD PrevYTD
123 ABC Qty 30 20
Sales 500 400
DEG Qty 100 150
Sales 1,000 2,000
The YTD and PrevYTD are columns and the values.
I can do a custom subtotal on the 'Grouping' field and choose Sum and it gives me the totals at the end of the report:
Qty Sum 130 170
Sales Sum 1,500 2.400
This is good to this point, but I also want to have subtotals by customer. What I want to see is the same breakdown under each customer (a total of Qty and a total of Sales) but I cannot get this subtotal to work. When I put a subtotal on the Customer field, it puts a oneline subtotal and is adding the Qty and the Sales together. In this example if I put a subtotal on Customer This is what it will display:
123 Total 1630 2570
Is this possible to do what I am looking for?
Thanks for the help!
How about making Grouping a column label instead? It will change the layout somewhat but will allow you to get the effect you are after.
To do this you need to use a second pivot table. It's easier to do it with the tables side-by-side, but you can do it with a table underneath by just deleting the second table and inserting a new pivot table after the last row of the first each time the first table is changed.

Resources