Average Standard Deviation in Pivot Table for multiple entries

Shivi0189

New Member
Joined
Apr 1, 2019
Messages
8
I have data in the below format:

[TABLE="width: 530"]
<colgroup><col span="2"><col><col span="5"></colgroup><tbody>[TR]
[TD]BOAT NO[/TD]
[TD]LOT NO[/TD]
[TD]D1[/TD]
[TD]D2[/TD]
[TD]D3[/TD]
[TD]D4[/TD]
[TD]D5[/TD]
[TD]STATUS[/TD]
[/TR]
[TR]
[TD]F4/337[/TD]
[TD]5973[/TD]
[TD]10.6[/TD]
[TD]10.59[/TD]
[TD]10.59[/TD]
[TD]10.59[/TD]
[TD]10.59[/TD]
[TD]ACC[/TD]
[/TR]
[TR]
[TD]F4/338[/TD]
[TD]5973[/TD]
[TD]10.6[/TD]
[TD]10.58[/TD]
[TD]10.59[/TD]
[TD]10.6[/TD]
[TD]10.6[/TD]
[TD]ACC[/TD]
[/TR]
[TR]
[TD]F4/339[/TD]
[TD]5915[/TD]
[TD]10.61[/TD]
[TD]10.62[/TD]
[TD]10.61[/TD]
[TD]10.61[/TD]
[TD]10.62[/TD]
[TD]ACC[/TD]
[/TR]
[TR]
[TD]F4/340[/TD]
[TD]5986[/TD]
[TD]10.59[/TD]
[TD]10.58[/TD]
[TD]10.59[/TD]
[TD]10.58[/TD]
[TD]10.58[/TD]
[TD]ACC[/TD]
[/TR]
[TR]
[TD]F4/341[/TD]
[TD]5915[/TD]
[TD]10.47[/TD]
[TD]10.49[/TD]
[TD]10.48[/TD]
[TD]10.48[/TD]
[TD]10.49[/TD]
[TD]ACC[/TD]
[/TR]
[TR]
[TD]F4/342[/TD]
[TD]5915[/TD]
[TD]10.61[/TD]
[TD]10.62[/TD]
[TD]10.64[/TD]
[TD]10.48[/TD]
[TD]10.62[/TD]
[TD]ACC[/TD]
[/TR]
</tbody>[/TABLE]

I have made a pivot table where I have sort data as per lot no. I want to take average & stdev of entries in D1,...D5 for each lot no. spread in 5 columns, How to do that?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
like this?

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]Attribute[/td][td=bgcolor:#DDEBF7]Values[/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]D1[/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]D2[/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]D3[/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]D4[/td][td=bgcolor:#DDEBF7][/td][td=bgcolor:#DDEBF7]D5[/td][td=bgcolor:#DDEBF7][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]LOT NO[/td][td=bgcolor:#DDEBF7]Average of Value[/td][td=bgcolor:#DDEBF7]StdDev of Value[/td][td=bgcolor:#DDEBF7]Average of Value[/td][td=bgcolor:#DDEBF7]StdDev of Value[/td][td=bgcolor:#DDEBF7]Average of Value[/td][td=bgcolor:#DDEBF7]StdDev of Value[/td][td=bgcolor:#DDEBF7]Average of Value[/td][td=bgcolor:#DDEBF7]StdDev of Value[/td][td=bgcolor:#DDEBF7]Average of Value[/td][td=bgcolor:#DDEBF7]StdDev of Value[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5915​
[/td][td]
10.56333333​
[/td][td]
0.080829038​
[/td][td]
10.57666667​
[/td][td]
0.075055535​
[/td][td]
10.57666667​
[/td][td]
0.085049005​
[/td][td]
10.52333333​
[/td][td]
0.075055535​
[/td][td]
10.57666667​
[/td][td]
0.075055535​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5973​
[/td][td]
10.6​
[/td][td]
0​
[/td][td]
10.585​
[/td][td]
0.007071068​
[/td][td]
10.59​
[/td][td]
0​
[/td][td]
10.595​
[/td][td]
0.007071068​
[/td][td]
10.595​
[/td][td]
0.007071068​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5986​
[/td][td]
10.59​
[/td][td]
#DIV/0!​
[/td][td]
10.58​
[/td][td]
#DIV/0!​
[/td][td]
10.59​
[/td][td]
#DIV/0!​
[/td][td]
10.58​
[/td][td]
#DIV/0!​
[/td][td]
10.58​
[/td][td]
#DIV/0!​
[/td][/tr]
[/table]
 
Upvote 0
like this?

[TABLE="class: head"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"]Attribute[/TD]
[TD="bgcolor: #DDEBF7"]Values[/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"]D1[/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"]D2[/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"]D3[/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"]D4[/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[TD="bgcolor: #DDEBF7"]D5[/TD]
[TD="bgcolor: #DDEBF7"][/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: #DDEBF7"]LOT NO[/TD]
[TD="bgcolor: #DDEBF7"]Average of Value[/TD]
[TD="bgcolor: #DDEBF7"]StdDev of Value[/TD]
[TD="bgcolor: #DDEBF7"]Average of Value[/TD]
[TD="bgcolor: #DDEBF7"]StdDev of Value[/TD]
[TD="bgcolor: #DDEBF7"]Average of Value[/TD]
[TD="bgcolor: #DDEBF7"]StdDev of Value[/TD]
[TD="bgcolor: #DDEBF7"]Average of Value[/TD]
[TD="bgcolor: #DDEBF7"]StdDev of Value[/TD]
[TD="bgcolor: #DDEBF7"]Average of Value[/TD]
[TD="bgcolor: #DDEBF7"]StdDev of Value[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD]
5915​
[/TD]
[TD]
10.56333333​
[/TD]
[TD]
0.080829038​
[/TD]
[TD]
10.57666667​
[/TD]
[TD]
0.075055535​
[/TD]
[TD]
10.57666667​
[/TD]
[TD]
0.085049005​
[/TD]
[TD]
10.52333333​
[/TD]
[TD]
0.075055535​
[/TD]
[TD]
10.57666667​
[/TD]
[TD]
0.075055535​
[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD]
5973​
[/TD]
[TD]
10.6​
[/TD]
[TD]
0​
[/TD]
[TD]
10.585​
[/TD]
[TD]
0.007071068​
[/TD]
[TD]
10.59​
[/TD]
[TD]
0​
[/TD]
[TD]
10.595​
[/TD]
[TD]
0.007071068​
[/TD]
[TD]
10.595​
[/TD]
[TD]
0.007071068​
[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD]
5986​
[/TD]
[TD]
10.59​
[/TD]
[TD]
#DIV/0!​
[/TD]
[TD]
10.58​
[/TD]
[TD]
#DIV/0!​
[/TD]
[TD]
10.59​
[/TD]
[TD]
#DIV/0!​
[/TD]
[TD]
10.58​
[/TD]
[TD]
#DIV/0!​
[/TD]
[TD]
10.58​
[/TD]
[TD]
#DIV/0!​
[/TD]
[/TR]
</tbody>[/TABLE]


No. I want only one average & stdev value for all 5 attributes(D1,D2,D3,D4,D5) against every lot no.
 
Upvote 0
like this?

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#DDEBF7]LOT NO[/td][td=bgcolor:#DDEBF7]Average of Value[/td][td=bgcolor:#DDEBF7]StdDev of Value[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5915​
[/td][td]
10.56333333​
[/td][td]
0.069556418​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5973​
[/td][td]
10.593​
[/td][td]
0.006749486​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
5986​
[/td][td]
10.584​
[/td][td]
0.005477226​
[/td][/tr]
[/table]
 
Upvote 0
Yes
like this?

[TABLE="class: head"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD="bgcolor: #DDEBF7"]LOT NO[/TD]
[TD="bgcolor: #DDEBF7"]Average of Value[/TD]
[TD="bgcolor: #DDEBF7"]StdDev of Value[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD]
5915​
[/TD]
[TD]
10.56333333​
[/TD]
[TD]
0.069556418​
[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD]
5973​
[/TD]
[TD]
10.593​
[/TD]
[TD]
0.006749486​
[/TD]
[/TR]
[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] "]
[TD]
5986​
[/TD]
[TD]
10.584​
[/TD]
[TD]
0.005477226​
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
so use PowerQuery (Get&Transform)...
load your source table into PQ editor, select D columns, from the ribbon - Transform - Unpivot columns select Unpivot Only Selected Columns
then Close&Load as Connection
---
from Insert - PivotTable choose: use an external data source then Choose Connection and Query - Table1 (Open - OK)
put Lot No into ROWS Area, Value into the VALUES Area twice, one for Average, second for StdDev

PQPT.jpg
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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