ABS(column) not working in Excel PivotTable Grand Total - excel

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.

Related

Pivot table calculation of counted columns

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

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

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

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

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

Left outer join sum with DAX

I have 2 tables:
Fact sales table (sales)
Dimensional period table (dimperiod)
I have joined them through my model on the Period column. However, when I display the sales sum I got this.
I would like to have a row where no sales were made with a sum equal to 0. As below:
I've used the following DAX but didn't work.
CustomSales:=CALCULATE(SUM([Sales]), NATURALLEFTOUTERJOIN(sales,dimperiod))
Just change the pivot table to display blanks.
Or add 0 to your measure. Pivot tables do not display blanks by default. The first option above forces the pivot to display blanks, but you'd need to set this per pivot table. Addition implicitly coerces a blank to a numeric type.
SumSales:=
SUM( 'Sales'[Sales] ) + 0

Resources