Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nigel Drinkwater
 
Posts: n/a
Default Calculated fields in pivot tables

I have a pivot table set up reporting monthly margins based on detailed sales
data, on the back of which I have a pivot chart. I have successfully
inserted a summary budget number (as a calculated field) into the pivot table
and graph, and it looks fairly simple:

Month Margin Budget
Jan 5 8
Feb 6 8
Etc.

I want to break this down to a product group looking at just margin and
budget, e.g.

A B
Month Margin Budget Margin Budget
Jan 3 4 2 4
Feb 3 4 3 4
Etc.

But I cant get it to work €“ I know I will need to re-define the budget
numbers, but do I still need a calculated field or should I be using a
calculated item? Neither appears to be doing what I want.

Many thanks,

Nigel
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gilles Desjardins
 
Posts: n/a
Default Calculated fields in pivot tables

A calculated item would be something like increase the sales of all dairy
products by 5%
A calculated item would be increase the butter by 5%, the yogurt by 6% and
the milk by 2%.
therefore you have to determine what is what in your database.

Does this make sense to you?

Gilles
"Nigel Drinkwater" wrote in
message ...
I have a pivot table set up reporting monthly margins based on detailed
sales
data, on the back of which I have a pivot chart. I have successfully
inserted a summary budget number (as a calculated field) into the pivot
table
and graph, and it looks fairly simple:

Month Margin Budget
Jan 5 8
Feb 6 8
Etc.

I want to break this down to a product group looking at just margin and
budget, e.g.

A B
Month Margin Budget Margin Budget
Jan 3 4 2 4
Feb 3 4 3 4
Etc.

But I can't get it to work - I know I will need to re-define the budget
numbers, but do I still need a calculated field or should I be using a
calculated item? Neither appears to be doing what I want.

Many thanks,

Nigel



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nigel Drinkwater
 
Posts: n/a
Default Calculated fields in pivot tables

Sorry, no. Did you mean to use the calculated item in both examples or is
one a calculated field?

I understand that I could use one of the fields to increase/decrease values
by a percentage, but can I not therefore use it to display a fixed value
dependant on category? I notice that the formatting was lost on the original
post, so to confirm I am keeping the rows the same with the months displayed
and trying to bring the product groups into the columns and use and IF
statement in the calculated item/field to give me the budget, e.g.:

IF(product group = a , 4 , IF(product group = b , 4 , etc.))...

If I can get this working then I can chart actual against budget at a lower
level then the top level that I currently have working.

Thanks,

Nigel

"Gilles Desjardins" wrote:

A calculated item would be something like increase the sales of all dairy
products by 5%
A calculated item would be increase the butter by 5%, the yogurt by 6% and
the milk by 2%.
therefore you have to determine what is what in your database.

Does this make sense to you?

Gilles
"Nigel Drinkwater" wrote in
message ...
I have a pivot table set up reporting monthly margins based on detailed
sales
data, on the back of which I have a pivot chart. I have successfully
inserted a summary budget number (as a calculated field) into the pivot
table
and graph, and it looks fairly simple:

Month Margin Budget
Jan 5 8
Feb 6 8
Etc.

I want to break this down to a product group looking at just margin and
budget, e.g.

A B
Month Margin Budget Margin Budget
Jan 3 4 2 4
Feb 3 4 3 4
Etc.

But I can't get it to work - I know I will need to re-define the budget
numbers, but do I still need a calculated field or should I be using a
calculated item? Neither appears to be doing what I want.

Many thanks,

Nigel




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gilles Desjardins
 
Posts: n/a
Default Calculated fields in pivot tables

Sorry Nigel, I haven't forgotten you, just trying to formulate a better
response

Gilles
"Nigel Drinkwater" wrote in
message ...
I have a pivot table set up reporting monthly margins based on detailed
sales
data, on the back of which I have a pivot chart. I have successfully
inserted a summary budget number (as a calculated field) into the pivot
table
and graph, and it looks fairly simple:

Month Margin Budget
Jan 5 8
Feb 6 8
Etc.

I want to break this down to a product group looking at just margin and
budget, e.g.

A B
Month Margin Budget Margin Budget
Jan 3 4 2 4
Feb 3 4 3 4
Etc.

But I can't get it to work - I know I will need to re-define the budget
numbers, but do I still need a calculated field or should I be using a
calculated item? Neither appears to be doing what I want.

Many thanks,

Nigel



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gilles Desjardins
 
Posts: n/a
Default Calculated fields in pivot tables

Hi Nigel,

Here is another way to look at it.

Amy and Bob have worked all year from Jan to Dec and the results appear in a
pivot table like so:

Month Amy Bob
Jan 23000 20000
Feb 24000 23500
Mar 24600 27000
etc.

You are asked to calculate their revenues per Quarter. That would be a
calculated item: You add Jan+Feb+Mar and call it QTR1. To do this you click
on the Pivot table tool bar menu, Formula, calculated item. Your cursor
should be in the ROW area.

Then you are asked to show what an increase of 5% would look like. You click
in the COLUMN area and multiply the Sales by 1.05. This is a calculated
field.

Here is the "official" Excel explanation
1.. Decide whether you want a calculated field or a calculated item within
a field.
Use a calculated field when you want to use the data from another field in
your formula. Use a calculated item when you want your formula to use data
from one or more specific items (item: A subcategory of a field in
PivotTable and PivotChart reports. For instance, the field "Month" could
have items such as "January," "February," and so on.) within a field.

2.. Do one of the following. For best results in a PivotChart report work
in the associated PivotTable report where you can see the individual data
values that your formula calculates.
Add a calculated field

1.. Click the report.
2.. On the PivotTable toolbar click PivotTable or PivotChart, point to
Formulas, and then click Calculated Field.
3.. In the Name box, type a name for the field.
4.. In the Formula box, enter the formula for the field.
To use the data from another field in the formula, click the field in
the Fields box, and then click Insert Field. For example, to calculate a 15%
commission on each value in the Sales field, you could enter = Sales * 15%.

5.. Click Add, and then click OK.
Add a calculated item to a field

1.. If items in the field are grouped, right-click each group, point to
Group and Outline on the shortcut menu and then click Ungroup.
2.. Click the field where you want to add the calculated item.
3.. On the PivotTable toolbar click PivotTable or PivotChart, point to
Formulas, and then click Calculated Item.
4.. In the Name box, type a name for the calculated item.
5.. In the Formula box, enter the formula for the item.
To use the data from an item in the formula, click the item in the Items
list, and then click Insert Item (the item must be from the same field as
the calculated item).

6.. Click Add, and then click OK.
7.. If you ungrouped items in step 1, regroup them if you want.
3.. For calculated items, you can enter different formulas cell by cell.
How?

For example, if a calculated item named Strawberries has a formula of
=Oranges * .25 across all months, you can change the formula to =Oranges *.5
for June, July, and August.

1.. Click a cell for which you want to change the formula.
To change the formula for several cells, hold down CTRL and click the
additional cells.

2.. In the formula bar type the changes to the formula.
4.. If you have multiple calculated items or formulas, adjust the order of
calculation.
How?

1.. Click the report.
2.. On the PivotTable toolbar click PivotTable or PivotChart, point to
Formulas, and then click Solve Order.
3.. Click a formula, and then click Move Up or Move Down.
4.. Continue until the formulas are in the order that you want them to
be calculated.
Note When you add a formula to a PivotChart report or its associated
PivotTable report, some chart formatting may be lost.

N.B. Source data from OLAP databases doesn't allow you to create formulas.



Hope this helps



Gilles




Attached Images
 


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nigel Drinkwater
 
Posts: n/a
Default Calculated fields in pivot tables

Hi Gilles,

Happy New Year to you and again many thanks for coming back on this. I
think I do understand more clearly what the difference is between the two
now, however I am still struggling to solve this problem.

To take your example, if a budget were set for say 25,000 for Amy and 23,000
for Bob per month how would you show this?

At a top level of sales by month I had no problem inserting a calculated
field for, in this example, 48,000 and this was duly shown in each month as I
required. However, I cannot get this to show the breakdown when Amy and Bob
are in the column headings unless I create a separate field for each budget,
i.e. Amy budget & Bob budget fields. Whilst this would work at a pivot table
level it becomes a nightmare to show in a graph as it the calculated field is
not just called 'budget'.

If you can provide any more help I would be truly grateful.

Regards,

Nigel


"Gilles Desjardins" wrote:

Hi Nigel,

Here is another way to look at it.

Amy and Bob have worked all year from Jan to Dec and the results appear in a
pivot table like so:

Month Amy Bob
Jan 23000 20000
Feb 24000 23500
Mar 24600 27000
etc.

You are asked to calculate their revenues per Quarter. That would be a
calculated item: You add Jan+Feb+Mar and call it QTR1. To do this you click
on the Pivot table tool bar menu, Formula, calculated item. Your cursor
should be in the ROW area.

Then you are asked to show what an increase of 5% would look like. You click
in the COLUMN area and multiply the Sales by 1.05. This is a calculated
field.

Here is the "official" Excel explanation
1.. Decide whether you want a calculated field or a calculated item within
a field.
Use a calculated field when you want to use the data from another field in
your formula. Use a calculated item when you want your formula to use data
from one or more specific items (item: A subcategory of a field in
PivotTable and PivotChart reports. For instance, the field "Month" could
have items such as "January," "February," and so on.) within a field.

2.. Do one of the following. For best results in a PivotChart report work
in the associated PivotTable report where you can see the individual data
values that your formula calculates.
Add a calculated field

1.. Click the report.
2.. On the PivotTable toolbar click PivotTable or PivotChart, point to
Formulas, and then click Calculated Field.
3.. In the Name box, type a name for the field.
4.. In the Formula box, enter the formula for the field.
To use the data from another field in the formula, click the field in
the Fields box, and then click Insert Field. For example, to calculate a 15%
commission on each value in the Sales field, you could enter = Sales * 15%.

5.. Click Add, and then click OK.
Add a calculated item to a field

1.. If items in the field are grouped, right-click each group, point to
Group and Outline on the shortcut menu and then click Ungroup.
2.. Click the field where you want to add the calculated item.
3.. On the PivotTable toolbar click PivotTable or PivotChart, point to
Formulas, and then click Calculated Item.
4.. In the Name box, type a name for the calculated item.
5.. In the Formula box, enter the formula for the item.
To use the data from an item in the formula, click the item in the Items
list, and then click Insert Item (the item must be from the same field as
the calculated item).

6.. Click Add, and then click OK.
7.. If you ungrouped items in step 1, regroup them if you want.
3.. For calculated items, you can enter different formulas cell by cell.
How?

For example, if a calculated item named Strawberries has a formula of
=Oranges * .25 across all months, you can change the formula to =Oranges *.5
for June, July, and August.

1.. Click a cell for which you want to change the formula.
To change the formula for several cells, hold down CTRL and click the
additional cells.

2.. In the formula bar type the changes to the formula.
4.. If you have multiple calculated items or formulas, adjust the order of
calculation.
How?

1.. Click the report.
2.. On the PivotTable toolbar click PivotTable or PivotChart, point to
Formulas, and then click Solve Order.
3.. Click a formula, and then click Move Up or Move Down.
4.. Continue until the formulas are in the order that you want them to
be calculated.
Note When you add a formula to a PivotChart report or its associated
PivotTable report, some chart formatting may be lost.

N.B. Source data from OLAP databases doesn't allow you to create formulas.



Hope this helps



Gilles



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot tables - calculated fields Arls Excel Worksheet Functions 0 September 12th 05 01:48 PM
Not including blank fields in pivot tables Bhupinder Rayat Excel Worksheet Functions 1 August 23rd 05 02:58 PM
pivot tables - calculated fields Esche Excel Worksheet Functions 3 May 26th 05 05:25 PM
Pivot Tables - Variance and % Variance fields CraigS Excel Discussion (Misc queries) 5 January 6th 05 12:22 AM
Pivot Tables, calculated fields Excel GuRu Excel Discussion (Misc queries) 1 December 21st 04 12:08 AM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"