Pivot table calculated item problems

Hi,

Given a set of raw data shaped like this:

Cat    Item    Value
--------------------
  1        1        45
  1        2        37
  1        3        40
  2        1        38
  2        2        34
  2        3        31
  3        1        36
  3        2        39
  3        3        40
.......

I created a pivot table that uses "Cat" as a row field and "Value" as a data 
field. I then change the summary function for the "Value" field to use 
"Average". Next, I add the "Value" field as a data field again and this time 
change the summary function to "StDev". This all works ok.

I'd like to add a calculated item to my pivot table that allows me to take 
the standard deviation of "Value" and divide that by the average of "Value" 
to calculate the coefficient of variance.

When I try to add a calculated item to calculate the coefficient of variance 
(i.e. STDEV(value) / AVG(value) , I get the following error from Excel:

"Multiple data fields of the same field are not supported when a pivottable 
report has calculated items"

However, even if I eliminate this problem, I get another message from Excel 
when trying to add a calculated item as follows:

"Averages, standard deviations, and variances are not supported when a 
pivottable report has calculated items"

Can anyone suggest how I would go about adding this calculation (i.e. 
STDEV(value) / AVG(value) to my pivot table?

Thanks in advance,
Jim


0
Jim
3/15/2005 10:41:41 PM
excel 39879 articles. 2 followers. Follow

5 Replies
2431 Views

Similar Articles

[PageSpeed] 20

You could do the calculation in a column adjacent to the pivot table, 
but you won't be able to create a calculated field to do it in the pivot 
table.

Jim~C wrote:
> Hi,
> 
> Given a set of raw data shaped like this:
> 
> Cat    Item    Value
> --------------------
>   1        1        45
>   1        2        37
>   1        3        40
>   2        1        38
>   2        2        34
>   2        3        31
>   3        1        36
>   3        2        39
>   3        3        40
> ......
> 
> I created a pivot table that uses "Cat" as a row field and "Value" as a data 
> field. I then change the summary function for the "Value" field to use 
> "Average". Next, I add the "Value" field as a data field again and this time 
> change the summary function to "StDev". This all works ok.
> 
> I'd like to add a calculated item to my pivot table that allows me to take 
> the standard deviation of "Value" and divide that by the average of "Value" 
> to calculate the coefficient of variance.
> 
> When I try to add a calculated item to calculate the coefficient of variance 
> (i.e. STDEV(value) / AVG(value) , I get the following error from Excel:
> 
> "Multiple data fields of the same field are not supported when a pivottable 
> report has calculated items"
> 
> However, even if I eliminate this problem, I get another message from Excel 
> when trying to add a calculated item as follows:
> 
> "Averages, standard deviations, and variances are not supported when a 
> pivottable report has calculated items"
> 
> Can anyone suggest how I would go about adding this calculation (i.e. 
> STDEV(value) / AVG(value) to my pivot table?
> 
> Thanks in advance,
> Jim
> 
> 


-- 
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

0
dsd1 (5911)
3/15/2005 11:12:48 PM
Deb,

Thanks for your reply.

Hmm...I'm trying to create a reusable "template" for data analysis of this 
data from a database. So, adding an adjacent column seems dangerous for two 
reasons:

    - The calculations would use GETPIVOTDATA function which does not fill 
down correctly
    - What happens if the user rearranges the pivot table. Does this destroy 
the adjacent column and it's data?

It certainly helps to know that I'm barking up the wrong tree with trying 
the calculated item. I'm scratching my head for a better approach...

Cheers,
Jim


"Debra Dalgleish" <dsd@contexturesXSPAM.com> wrote in message 
news:42376BF0.3040802@contexturesXSPAM.com...
> You could do the calculation in a column adjacent to the pivot table, but 
> you won't be able to create a calculated field to do it in the pivot 
> table.
>
> Jim~C wrote:
>> Hi,
>>
>> Given a set of raw data shaped like this:
>>
>> Cat    Item    Value
>> --------------------
>>   1        1        45
>>   1        2        37
>>   1        3        40
>>   2        1        38
>>   2        2        34
>>   2        3        31
>>   3        1        36
>>   3        2        39
>>   3        3        40
>> ......
>>
>> I created a pivot table that uses "Cat" as a row field and "Value" as a 
>> data field. I then change the summary function for the "Value" field to 
>> use "Average". Next, I add the "Value" field as a data field again and 
>> this time change the summary function to "StDev". This all works ok.
>>
>> I'd like to add a calculated item to my pivot table that allows me to 
>> take the standard deviation of "Value" and divide that by the average of 
>> "Value" to calculate the coefficient of variance.
>>
>> When I try to add a calculated item to calculate the coefficient of 
>> variance (i.e. STDEV(value) / AVG(value) , I get the following error from 
>> Excel:
>>
>> "Multiple data fields of the same field are not supported when a 
>> pivottable report has calculated items"
>>
>> However, even if I eliminate this problem, I get another message from 
>> Excel when trying to add a calculated item as follows:
>>
>> "Averages, standard deviations, and variances are not supported when a 
>> pivottable report has calculated items"
>>
>> Can anyone suggest how I would go about adding this calculation (i.e. 
>> STDEV(value) / AVG(value) to my pivot table?
>>
>> Thanks in advance,
>> Jim
>>
>>
>
>
> -- 
> Debra Dalgleish
> Excel FAQ, Tips & Book List
> http://www.contextures.com/tiptech.html
> 


0
Jim
3/15/2005 11:24:54 PM
You can turn off GETPIVOTDATA and fill down normally

See Debra's site at:-
http://www.contextures.com/xlPivot06.html

-- 
Regards
           Ken.......................    Microsoft MVP - Excel
              Sys Spec - Win XP Pro /  XL 97/00/02/03

----------------------------------------------------------------------------
                  It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------
<snip>


0
ken.wright (2489)
3/15/2005 11:57:30 PM
It seems to me that you could create a separate column (called CV) in the
Excel Table that calculates the CV in a specific Cell using the formula you
noted.  Then when you create the Pivot table use that column in the data
area for the Pivot table.






"Jim~C" <jdchanATnovusint.com> wrote in message
news:eTUdzYbKFHA.3512@TK2MSFTNGP15.phx.gbl...
> Deb,
>
> Thanks for your reply.
>
> Hmm...I'm trying to create a reusable "template" for data analysis of this
> data from a database. So, adding an adjacent column seems dangerous for
two
> reasons:
>
>     - The calculations would use GETPIVOTDATA function which does not fill
> down correctly
>     - What happens if the user rearranges the pivot table. Does this
destroy
> the adjacent column and it's data?
>
> It certainly helps to know that I'm barking up the wrong tree with trying
> the calculated item. I'm scratching my head for a better approach...
>
> Cheers,
> Jim
>
>
> "Debra Dalgleish" <dsd@contexturesXSPAM.com> wrote in message
> news:42376BF0.3040802@contexturesXSPAM.com...
> > You could do the calculation in a column adjacent to the pivot table,
but
> > you won't be able to create a calculated field to do it in the pivot
> > table.
> >
> > Jim~C wrote:
> >> Hi,
> >>
> >> Given a set of raw data shaped like this:
> >>
> >> Cat    Item    Value
> >> --------------------
> >>   1        1        45
> >>   1        2        37
> >>   1        3        40
> >>   2        1        38
> >>   2        2        34
> >>   2        3        31
> >>   3        1        36
> >>   3        2        39
> >>   3        3        40
> >> ......
> >>
> >> I created a pivot table that uses "Cat" as a row field and "Value" as a
> >> data field. I then change the summary function for the "Value" field to
> >> use "Average". Next, I add the "Value" field as a data field again and
> >> this time change the summary function to "StDev". This all works ok.
> >>
> >> I'd like to add a calculated item to my pivot table that allows me to
> >> take the standard deviation of "Value" and divide that by the average
of
> >> "Value" to calculate the coefficient of variance.
> >>
> >> When I try to add a calculated item to calculate the coefficient of
> >> variance (i.e. STDEV(value) / AVG(value) , I get the following error
from
> >> Excel:
> >>
> >> "Multiple data fields of the same field are not supported when a
> >> pivottable report has calculated items"
> >>
> >> However, even if I eliminate this problem, I get another message from
> >> Excel when trying to add a calculated item as follows:
> >>
> >> "Averages, standard deviations, and variances are not supported when a
> >> pivottable report has calculated items"
> >>
> >> Can anyone suggest how I would go about adding this calculation (i.e.
> >> STDEV(value) / AVG(value) to my pivot table?
> >>
> >> Thanks in advance,
> >> Jim
> >>
> >>
> >
> >
> > --
> > Debra Dalgleish
> > Excel FAQ, Tips & Book List
> > http://www.contextures.com/tiptech.html
> >
>
>


0
zelig (9)
3/17/2005 10:24:57 PM
Yes, that would be great except that calculating the CV is only valid when 
using the averages calculated by the pivot table.

"Zel Dolinsky" <zelig@snet.net> wrote in message 
news:Zsn_d.10960$DW.936@newssvr17.news.prodigy.com...
> It seems to me that you could create a separate column (called CV) in the
> Excel Table that calculates the CV in a specific Cell using the formula 
> you
> noted.  Then when you create the Pivot table use that column in the data
> area for the Pivot table.
>
>
>
>
>
>
> "Jim~C" <jdchanATnovusint.com> wrote in message
> news:eTUdzYbKFHA.3512@TK2MSFTNGP15.phx.gbl...
>> Deb,
>>
>> Thanks for your reply.
>>
>> Hmm...I'm trying to create a reusable "template" for data analysis of 
>> this
>> data from a database. So, adding an adjacent column seems dangerous for
> two
>> reasons:
>>
>>     - The calculations would use GETPIVOTDATA function which does not 
>> fill
>> down correctly
>>     - What happens if the user rearranges the pivot table. Does this
> destroy
>> the adjacent column and it's data?
>>
>> It certainly helps to know that I'm barking up the wrong tree with trying
>> the calculated item. I'm scratching my head for a better approach...
>>
>> Cheers,
>> Jim
>>
>>
>> "Debra Dalgleish" <dsd@contexturesXSPAM.com> wrote in message
>> news:42376BF0.3040802@contexturesXSPAM.com...
>> > You could do the calculation in a column adjacent to the pivot table,
> but
>> > you won't be able to create a calculated field to do it in the pivot
>> > table.
>> >
>> > Jim~C wrote:
>> >> Hi,
>> >>
>> >> Given a set of raw data shaped like this:
>> >>
>> >> Cat    Item    Value
>> >> --------------------
>> >>   1        1        45
>> >>   1        2        37
>> >>   1        3        40
>> >>   2        1        38
>> >>   2        2        34
>> >>   2        3        31
>> >>   3        1        36
>> >>   3        2        39
>> >>   3        3        40
>> >> ......
>> >>
>> >> I created a pivot table that uses "Cat" as a row field and "Value" as 
>> >> a
>> >> data field. I then change the summary function for the "Value" field 
>> >> to
>> >> use "Average". Next, I add the "Value" field as a data field again and
>> >> this time change the summary function to "StDev". This all works ok.
>> >>
>> >> I'd like to add a calculated item to my pivot table that allows me to
>> >> take the standard deviation of "Value" and divide that by the average
> of
>> >> "Value" to calculate the coefficient of variance.
>> >>
>> >> When I try to add a calculated item to calculate the coefficient of
>> >> variance (i.e. STDEV(value) / AVG(value) , I get the following error
> from
>> >> Excel:
>> >>
>> >> "Multiple data fields of the same field are not supported when a
>> >> pivottable report has calculated items"
>> >>
>> >> However, even if I eliminate this problem, I get another message from
>> >> Excel when trying to add a calculated item as follows:
>> >>
>> >> "Averages, standard deviations, and variances are not supported when a
>> >> pivottable report has calculated items"
>> >>
>> >> Can anyone suggest how I would go about adding this calculation (i.e.
>> >> STDEV(value) / AVG(value) to my pivot table?
>> >>
>> >> Thanks in advance,
>> >> Jim
>> >>
>> >>
>> >
>> >
>> > --
>> > Debra Dalgleish
>> > Excel FAQ, Tips & Book List
>> > http://www.contextures.com/tiptech.html
>> >
>>
>>
>
> 


0
Jim
3/19/2005 2:21:37 AM
Reply:

Similar Artilces:

Pivot Table Counting
I am having trouble trying to calculate fields through a pivot table. Basically, I have a data set that looks like this: Record Number State Value 1 CA 0 2 CA 12 3 CA 15 4 NJ 0 5 NJ 10 I want to set up a pivot table that will show 2 columns, one with th total number of records and one with the total number of records wit non-zero values. Both of the...

Problems with external contacts. Help!!!
Hi, I wondered if someone could help me, I am trying to add a list of frequently used external contacts to my exchange 2000 site. Now, I have created an OU, and the appropriate search and setup a few contacts and their email addresses, in this case all the external addresses reside in one external domain - it's not connected to exchange in any way other than the "contact" entry. No ad user exists. Lets say hotmail.com is the domain and craig_home@hotmail.com is the contact created. This appears in the Outlook address list as I would expect. The problem is when I email them I g...

MRP Regeneration (Items)
Hi, I receive this error in MRP Regeneration (Items) [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PKMP010330'. Cannot insert duplicate key in object 'MP010330'. When restarting a full regeneration after that error, it' ok. ...

Pivot Tables #4
Hello you experts out there. I nned some Pivot table advice ( a website address for basics would be great), for instance how to excplain pivots and how to create them. I use lots of products with lots of sizes from various suppliers to name but a few columns. Is there a limit as to the amount of columns of data? Thank you very much. H Hi check out Debra Dalgleish's site - http://www.contextures.com/tiptech.html - she has a link to Jon Peltier's site which explains PT basics and then lots more interesting info on them. -- Cheers JulieD check out www.hcts.net.au/tipsandtric...

SMTP Connector
Error Message received by NDR - This message was rejected due to the current administrative policy by the destination server Can anyone shed some light on this one? This only happens with random external domains. Cheers On Wed, 23 Aug 2006 18:07:02 -0700, Help <Help@discussions.microsoft.com> wrote: >Error Message received by NDR - This message was rejected due to the current >administrative policy by the destination server > >Can anyone shed some light on this one? This only happens with random >external domains. > >Cheers Sounds like they are blocking you...

Pivot Tables
Hi, I was windering if some one could provide me with a link to a tutorial for what I am trying to do. I have an aggregate table. This table has several groups and several columns. The intersection of a group and column is an aggreate value such as Sum function of a column value in that group. Normally a Pivot table shows 1 aggregate value at the intersection of a group and a column. What I want is: To show more than one value at the intersection besides the aggregate value. In other words, if a simple pivot table cell is: Aggr(x,y) where aggr is an aggregate function such a...

an odd problem about listctrl
the following codes: m_cListCtrl.SetFocus(); m_cListCtrl.SetItemState(1, LVIS_SELECTED, LVIS_SELECTED | LVIS_FOCUSED); m_cListCtrl.EnsureVisible(1, TRUE); works in a button handle function but doesn't function OnInitDialog(); i wanna make one of the items in my listctrl hilighted when dialog shows. thanx for help. best regards, kywoo it's done, thanks kywoo "Jeff Partch" <jeffp@mvps.org> д����Ϣ news:OICm#tLZDHA.652@TK2MSFTNGP10.phx.gbl... > "kywoo" <kywoo@vip.sina.com> wrote in message > news:%23TKwUhLZDHA.4020@tk2msftngp13.phx.gbl... >...

Exchange ActiveSync problem
Dear All, My boss have a mobile phone SonyEricsson P990i. I had already installed the update Exchange ActiveSync patch of P990i and I can connect to Exchange server. But it comes error at 70% when the calendar have a lot of items. Also, the calendar isn't include all the itmes. After disable sync calender, it's all ok for sync contacts and emails, what's the problem? I can update the calendar when I use my email account which is include little items. Is it had some patch for update in the phone? Thank you very much. Ken. "Ken" <goukilee@yahoo.com.hk> wr...

the text of item during Drag'n'Drop of item of CTreeCtrl
Hi! MSDN sample cmnctrl1 works. But my code can't show the item text of CTreeCtrl during Drag'n'Drop :(. What did I forget to set? Thanks. ...

Pivot Chart Formatting #5
How can I format a Pivot Chart and keep the customized format when refreshed? This is a known issue by Microsoft. Short answer, you can't do it. =( One possible work around is to record a macro of you setting the formatting of the chart, and then set it up so that the macro runs whenever the chart calculates. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Germeny Santos" wrote: > How can I format a Pivot Chart and keep the customized format when refreshed? Hi, This is dependent on what custom formatting you are refering to. T...

Pivot table question: Sorting the subgroup in a pivot table (when using the top 10 option for the subgroup)
Hello: I have created a pivot table which has a one subgroup in the second column from the left. It uses the Top 10 option, so there are 10 subgroups So my data looks something like this: Group 1 50 Subgroup 1a 10 Subgroup 1b 40 Eight more subgroups Group 2 30 Subgroup 2a 20 Subgroup 2b 10 Eight more subgroups What I would like to do is sort by THe totals for Group 1, but then also sort by the subgroups, based on the values for each subgroup (similar to the "Sort by, ...

How do I calculate the Root Mean Square (RMS)
=SQRT(AVERAGE(A1:A5^2)) array entered (ctrl+shift+enter) where A1:a5 is the range where the number range exists "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@discussions.microsoft.com> wrote in message news:4AECE52A-2666-43FB-9717-3D98B2747894@microsoft.com... > aaaaaaaaaaaaaaaaaaaaaaaaaa, You need to know the values you're wanting the RMS of. If this is electronics, where RMS is virtually completely misunderstood, you need to say what the waveform is (sine, square, program material, or what), and what you know about...

chart template problems
When I save a chart template out in ppt 2007, it only seems to hold the colors and style of the default series. For instance, in a line chart, the first 3 series are the colors I have set along with the right line style and marker type. But if I add more series, they default to random colors (it doesn't even seem to be pulling from the color palette). When I was customizing the chart, I made sure all the fills and lines were a specific color and not set to automatic. When I insert a chart using the saved chart template, however, it only holds some of the styles. Any ideas?? ...

join multiple pivot tables?
How can I link up multiple pivottables all based on the same data where all i would have to do is change the page option (drop down menu) from the first pivot and the rest of the pivots would automatically adjust to match those? There's a sample file here in which you can change the page field in one pivot table, and all the related pivot tables change: http://www.contextures.com/excelfiles.html Under Pivot Tables, look for 'PT0021 - Change All Page Fields' or 'PT0008 - Change Multiple Page Fields' clueless_in_mempjhis wrote: > How can I link up mu...

Help with pivot table
I'm after some help with a pivot table I have created a work book to log certain defects, and would like to use a pivot table to show defects per unit on an improvement tracker, is it possible to have the pivot table to shift cells to the right when it is updated and required more columns so it doesn't overwrite data on the sheet it would be like this the componet fault unit numbers & Total defects are the pivot table & the action would be the start of the manual data Compontent Fault Unit Numbers Total Defects Action 1 2 3 4 5 Light Inop 1 1 ...

the item has not been retrivered from the server
can't open mail No details provided for anyone to even guess what's going on. Please respond and include the following information: Version of Outlook Type of mail account O/S, including SP The exact and complete error message, including any error numbers. When the error occurs. When did Outlook last work? Are you viewing the send/receive progress? If so, click on the errors tab and copy the error message here. -- Kathleen Orland "can't open mail" <can't open mail@discussions.microsoft.com> wrote in message news:7DCD32D0-CC1D-476A-A904-...

some MS Money problems that have kept me from upgrading
I currently have MS Money 2000. I've purchased Money 2004, but switched back to 2000 because I didn't feel that much was improved. As I'm investigating Money 2007, there are still features missing that I believe it should have. 1) the ability to set up bimonthly payments for mortgages, auto loans, credit cards, etc. Paying bi-monthly can drastically reduce the interest paid over the life of a loan. 2) an easy-to-use balance transfer/consolidation simulator. it would be great to simulate projected savings and effective interest rates when considering balance transfer senario...

Changing the calculation order
Can the order that Excel recalculates be changed to start fro the lower right? Excel automatically adjusts its final calculation order depending on the dependency chain in such a way as to get the correct result regardless of formula sequence. Why would you want to change this? Charles ______________________ Decision Models FastExcel 2.1 now available www.DecisionModels.com "A Process Modeler" <A Process Modeler@discussions.microsoft.com> wrote in message news:4D17FF7C-D763-4FAB-980C-463DB8A75FCA@microsoft.com... > Can the order that Excel recalculates be changed to ...

Automatically assigning items to new vendors
Working with a client who has a fixed set of services that they purchase from doctors. Each doctor is set up as a vendor in GP (v10, sp3) and all service items need to be associated with each doctor for use on POs. Additionally when new doctors are added thay also need to have all service items assigned. Has anyone tried doing this? I was thinking about a trigger based on new vendor inserts. Any guidance would be appreciated. Correct, You will need a trigger for the new vendors and you will need to run an INSERT statement for the existing ones that are not yet associated. Best r...

Office Installation problem
I have installed Office Enterprise 2007 on my new PC, following the death of my old PC. I am running Windows 7 Home Premium. This is the same version of Office that I was running on my old windows Vista machine. On day one the Office Application installed okay, activated and was fully working. On day 2 it stopped working, giving an error message that said "Microsoft Word has not been installed for the current user. Please run setup to install the application." I get similar messages for Excel etc. I've tried uninstalling and reinstalling, and using the advice in ...

Custom Calculation Problem
I have a 4 column table (Column A,B,C and D)as my source data. D contains numbers. I do a pivot table report. I layout A,B and C (in this order with subtotals off) as row fields and D as datafield as sum. I reenter D into the data area and do a custom calculation by specifying Show data as: "Difference From", with Base field = B and Base item = (previous). The result i wanted would have a sum of all B items with common A's as well as the difference between consecutive items. The custom calculation behaves inconsistently: for some items, it shows the difference for some it doesn...

Can I permanently delete/hide data within Pivot Tables?
Microsoft Excel 2002 I have 155 clients which I need to run Pivot Tables for! All with the same pivot table layout. Is it possible to run the Pivot table with the 155 clients as a Template basically, then somehow delete or permanently hide the data leaving only one client, so that I can save multiple copies for each of the individual clients? Or can I set up a pivot table where I can automatically feed in parameters? Client details are stored on an Oracle database! Hi Peter, Right-click on a Page Field and select Field Settings from the context menu, then click the Advanced button. Yo...

Using formulas for pivot table
I know you have the count field but is there away to input a formula? For example customer ordered 25 cases and each case weighs 4 lbs and the end result would need to be total pounds ordered. Thanks! If you do the calculation in the pivot table you may not get the result that you expect. If possible, add a field to the source data, and calculate the order total there. Then, add the OrderTotal field to the pivot table's data area. tskb wrote: > I know you have the count field but is there away to input a formula? > For example customer ordered 25 cases and each case weighs 4 lbs...

Conditional format problem
I have a column of data in an excel spreadsheet that uses the "workday" function to create a cell value that shows a date. when you manually input a date in one of the cells, all of the cells below auto adjust to the new dates based on the "workday" formula. what I want to do is when a date is manually input into one of the cells that has the workday formula in it, I want the cell to change color if the new date is before or after the date that was originally in this cell with the formula. when I try to input the conditional format, I am getting an error message that...

Hiding a menu item
Hi, I am working in MDI/ MFC application. I want to hide a menu item if all the options below it are disabled. File Option1 Option2 Option3 If I disable all the three options in my code then I want File to disappear. Has anyone tried to do something like this before. Thanks, Siddharth You can dynamically add and remove items from the menus: <skasat@gmail.com> wrote in message news:1141344812.002321.127610@v46g2000cwv.googlegroups.com... > Hi, > > I am working in MDI/ MFC application. I want to hide a menu item if > all the options below it are disabled. &g...