trying to get average values in a pp pivot table

nmss18

Active Member
Joined
Jun 28, 2011
Messages
312
Hello,
I have a pp pivot table analyzing the number of alerts that ocurred over the course of the year. I am having difficulty in trying to create one particular table.
I am analyzing a 1 years worth of data .
In my table i have the day of the week in the row labels (i.e. monday - thursday) and in the values I have the count of alert. This gives me the sum amount of alerts that ocurred on every monday, thuesday, wednesday and Thursday.
what I am trying to do is get an average value. That is I would like to see how many alerts we experienced on the average monday.
I toyed around with the edit measure in the PP field list to no avail.
Does anyone have any ideas?
Thanks,
Nathan
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi
What I did to create Rate of Sale was:
In the powerpivot screen
click on new measure
Enter the Table Name where your data comes from ie DataFile
Enter a random name for your new value ie TotSales
then in Formula enter

=AverageX(DataFile, DataFile[Value Sales]) / SUMX(DataFile,DataFile[Store Numeric Distribution])As you enter the Table name each time the fields will appear for you to choose
I know this does not completly answer your question but hopfully it will give you something to play with until another answer comes along

Martin
 
Upvote 0
Hi nathan. I'm guessing in your date dable you have a years worth of dates in one column and number of alert for that day in the next column. You have then created a column to calc the day of the week for each day. Assuming that is correct you have created a pivot table and selected "Day of Week" as rows and "alert Count" as the values . The defualt for pivots is count which is what you seem to have, but in this case you can simply click on the down arrow next to "Count of Alert" in values book and click "value field settings" and change to average. This is regular pivot table table stuff.

Mike
 
Upvote 0
Mike,
I did what you suggest but when I do that I get a numbers that i dont understand.
For example this is the a partial view of the table:

DateDOWCount of Event ID
2012-02-01Wednesday2455
2012-02-02Thursday2030
2012-02-03Friday2914
2012-02-04Saturday9880
2012-02-05Sunday776
2012-02-06Monday3533
2012-02-07Tuesday3579
2012-02-08Wednesday3492
2012-02-09Thursday4120

<tbody>
</tbody><colgroup><col><col><col></colgroup>


Now, when I edit the values to use the AVERAGE, this is what i get:
DateDOWCount of Event ID
2012-02-01Wednesday19374483.94
2012-02-02Thursday19388186.68
2012-02-03Friday19395337.61
2012-02-04Saturday19404088.04
2012-02-05Sunday19413972.28
2012-02-06Monday19421127.54
2012-02-07Tuesday19430967.82
2012-02-08Wednesday19440831.33
2012-02-09Thursday19450527.35

<tbody>
</tbody><colgroup><col><col><col></colgroup>
 
Upvote 0
Ok got it. Since your data consists of a table with one row per event you just need to calculate the average per DOW using a measure. Above it was averaging the entries for a single day where the Event ID is a long number so actually just returned average Event IDs of that day and they are all about 19,400,000 hence the above result.

Step 1. Create a new pivot with DOW as rows
Step 2. Create a measure to count how many of each DOW you have in your data set. I put it in the Tables2. Your data is being filtered by the DOW in each row so counts how many distinct dates.

DOW Count=CALCULATE(countrows(DISTINCT(TalmonLog[DateText])))

Step 3. New Measure: Average event per DOW=CALCULATE(count(TalmonLog[Event ID])/Table2[DOW Count])

This works directly from the RAW data so you dont need to put either the count ir the DOW count in the pivot. You can of course drop the "Average Event per Dow" into the pivot you have on "MainPivot" tab, but onyl the Grand total number is useful if you change the DOW filter.

I have made an example in your sheet, but lost your email to send it back to you if this isn't clear.

Hope that is what you needed

Mike
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,939
Members
449,094
Latest member
teemeren

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