Help with Standard Deviation Data

srmorgan

Board Regular
Joined
Apr 18, 2002
Messages
184
Office Version
  1. 365
Platform
  1. Windows
I have a database of about 180,000 rows. My columns are for example, charge#, date of charge, value of charge, department #, among others. The date range is Jan 1 to June 30th.
I have to find the standard deviation for each department, using the net daily billing as my metric. I can create a pivot with dates as columns, departments as row and sum of charges. No problem.

However I need to clean the data so that any date/department combination that nets out to zero becomes a blank when doing the standard deviation. If there are no transactions, I get a blank cell in the pivot but we don't want to include the zero cells in the average and standard deviation.
There are many date/department cells on the pivot showing zero and it is too cumbersome to delete all of the transactions that net to zero.

So the question is how do I clean the data?
I am using Excel 2007 at work.

Thanks for any suggestions
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Sorry I did not get back to you sooner.
I have 6 day's worth of data here but I have 180 days in my sample with about 10,000 charges per day. Here is a short example

Date Dept Charge Amount
1-Sep 17 WW2 16.00
1-Sep 17 AS3 21.00
2-Sep 17 ED4 8.00
2-Sep 17 ES3 34.00
3-Sep 17 ER4 40.00
3-Sep 17 ER4 (40.00)
4-Sep 17
4-Sep 17
5-Sep 17 AQ4 23.00
5-Sep 17 JY6 26.00
6-Sep 17 ES8 2.00
6-Sep 17 DR5 23.00

So I need the standard deviation of the sum for each day. In this example =stdevp(37,40,0,blank,49,25) but the net sum for 9/3 has to be a blank, not a zero cause it gives you a different result: with a zero 17.19, with the zero blanked out 8.76.
I put this all in a pivot and that works fine, it is getting the zeroes changed to blanks, or just selecting anything over zero for the standard deviation sample. There might be way to do this easily in the Analysis Pack but I will have to install it on Monday morning

Thank you very much
 
Upvote 0
No, I can't, or at least I don't think I can. If I had a row of zeros or a column of zeroes I could do a filter but otherwise I don't see a way to do it.

Thanks
SRM
 
Upvote 0
DateDeptCharge Amount
01-Sep17WW216
01-Sep17AS321Sum of Amount
02-Sep17ED48DateTotal
02-Sep17ES33401-Sep3737
03-Sep17ER44002-Sep4242
03-Sep17ER4-4003-Sep0
04-Sep1704-Sep
04-Sep1705-Sep4949
05-Sep17AQ42306-Sep2525
05-Sep17JY626Grand Total153
06-Sep17ES82
06-Sep17DR523
I used a pivot table to get amounts for each date and then replaced any zeros with blanks
do you want the standard deviation of 37,42,49,25 in this example/

<colgroup><col span="7"><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,695
Members
449,117
Latest member
Aaagu

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