PC Review


Reply
Thread Tools Rate Thread

Calculated field - pivottable

 
 
IgorM
Guest
Posts: n/a
 
      27th Nov 2008
Hello



I have a table with data as follows





A B

Animal Age

1 Cow 14

2 Sheep 23

3 Cow 87

4 Cow 123

5 Sheep 345

6 Sheep 22

7 Cow 12

8 Sheep 91



It is very simplified of course. I want to have a pivottable and in that
pivottable I want to see how many cows and how many sheeps there are within
a <90 and >90 age band. In other words I want to produce something like
this:



Animal Age < 90 Age >90

Cow 3 1

Sheep 2 2

Total 5 3



Is it possible to do that using calculated field (or other features of
pivottable). I wouldn't like to add any extra columns in the source table to
calculate the age band.

Regards



Igor


 
Reply With Quote
 
 
 
 
muddan madhu
Guest
Posts: n/a
 
      27th Nov 2008
using function we can derive the results

try this

=COUNT(IF((A2:A10="cow")*(B2:B10<=90),)) ( use ctrl + shift + enter )

=COUNT(IF((A3:A10="cow")*(B3:B10>90),)) ( use ctrl + shift + enter )



On Nov 27, 12:07*pm, "IgorM" <ig...@live.com> wrote:
> Hello
>
> I have a table with data as follows
>
> * * * * * * A * * * * * * * * * * B
>
> * * * * * * Animal * * * * * *Age
>
> 1 * * * * *Cow * * * * * * * *14
>
> 2 * * * * *Sheep * * * * * * *23
>
> 3 * * * * *Cow * * * * * * * *87
>
> 4 * * * * *Cow * * * * * * * *123
>
> 5 * * * * *Sheep * * * * * * *345
>
> 6 * * * * *Sheep * * * * * * *22
>
> 7 * * * * *Cow * * * * * * * *12
>
> 8 * * * * *Sheep * * * * * * *91
>
> It is very simplified of course. I want to have a pivottable and in that
> pivottable I want to see how many cows and how many sheeps there are within
> a <90 and >90 age band. In other words I want to produce something like
> this:
>
> Animal * * * * * *Age < 90 * * * * * * * * * *Age >90
>
> Cow * * * * * * * *3 * * * * * * * * * * * * * * * * 1
>
> Sheep * * * * * * *2 * * * * * * * * * * * * * * * * 2
>
> Total * * * * * * * 5 * * * * * * * * * * * * * * * * 3
>
> Is it possible to do that using calculated field (or other features of
> pivottable). I wouldn't like to add any extra columns in the source tableto
> calculate the age band.
>
> Regards
>
> Igor


 
Reply With Quote
 
Shane Devenshire
Guest
Posts: n/a
 
      27th Nov 2008
Hi,

First, what are you feeding the animals, I want some of it - sheep living to
345!

you don't need a calculated field

1. Remove the blank rows in your data
2. Select the data and choose Data, PivotTable and PivotChart Report, Next,
Next, Existing Worksheet, D1 (or any empty cell you choose), Finish.
3. Drag the animal field to the Row area
4. Drag the age field to the Column area
5. Drag the animal field to the Data area
6. Select the age titles 12 to 87 in the column area and choose PivotTable,
Group and Show Detail, Group
7. Type over the name Group1 with a title like <91 years
8. Select the age titles from 91 to 345 and repeat step 6. Name this >=91
Years.
9. Double-click the title <91 years (this will collapse it)
10. Double-click the title >=91 years (this will also collapse
11. Right click the grand total in the column area and choose Hide.

If this helps, please click the Yes button.

Cheers,
Shane Devenshire

"IgorM" wrote:

> Hello
>
>
>
> I have a table with data as follows
>
>
>
>
>
> A B
>
> Animal Age
>
> 1 Cow 14
>
> 2 Sheep 23
>
> 3 Cow 87
>
> 4 Cow 123
>
> 5 Sheep 345
>
> 6 Sheep 22
>
> 7 Cow 12
>
> 8 Sheep 91
>
>
>
> It is very simplified of course. I want to have a pivottable and in that
> pivottable I want to see how many cows and how many sheeps there are within
> a <90 and >90 age band. In other words I want to produce something like
> this:
>
>
>
> Animal Age < 90 Age >90
>
> Cow 3 1
>
> Sheep 2 2
>
> Total 5 3
>
>
>
> Is it possible to do that using calculated field (or other features of
> pivottable). I wouldn't like to add any extra columns in the source table to
> calculate the age band.
>
> Regards
>
>
>
> Igor
>
>
>

 
Reply With Quote
 
IgorM
Guest
Posts: n/a
 
      27th Nov 2008
It's a top secret mixture

I like your solution, but there is only one issue. What when new data is
entered and it's not grouped yet. The user (correct me if I'm wrong) has to
group it again. Is there a way to that in a way that will automatically
group them when the table is refreshed, so there is no need for user to play
with the pivottable structure?

Kind regards

Igor

Użytkownik "Shane Devenshire" <(E-Mail Removed)>
napisał w wiadomości
news:7369EAD2-EB8C-4F66-9650-(E-Mail Removed)...
> Hi,
>
> First, what are you feeding the animals, I want some of it - sheep living
> to
> 345!
>
> you don't need a calculated field
>
> 1. Remove the blank rows in your data
> 2. Select the data and choose Data, PivotTable and PivotChart Report,
> Next,
> Next, Existing Worksheet, D1 (or any empty cell you choose), Finish.
> 3. Drag the animal field to the Row area
> 4. Drag the age field to the Column area
> 5. Drag the animal field to the Data area
> 6. Select the age titles 12 to 87 in the column area and choose
> PivotTable,
> Group and Show Detail, Group
> 7. Type over the name Group1 with a title like <91 years
> 8. Select the age titles from 91 to 345 and repeat step 6. Name this >=91
> Years.
> 9. Double-click the title <91 years (this will collapse it)
> 10. Double-click the title >=91 years (this will also collapse
> 11. Right click the grand total in the column area and choose Hide.
>
> If this helps, please click the Yes button.
>
> Cheers,
> Shane Devenshire
>
> "IgorM" wrote:
>
>> Hello
>>
>>
>>
>> I have a table with data as follows
>>
>>
>>
>>
>>
>> A B
>>
>> Animal Age
>>
>> 1 Cow 14
>>
>> 2 Sheep 23
>>
>> 3 Cow 87
>>
>> 4 Cow 123
>>
>> 5 Sheep 345
>>
>> 6 Sheep 22
>>
>> 7 Cow 12
>>
>> 8 Sheep 91
>>
>>
>>
>> It is very simplified of course. I want to have a pivottable and in that
>> pivottable I want to see how many cows and how many sheeps there are
>> within
>> a <90 and >90 age band. In other words I want to produce something like
>> this:
>>
>>
>>
>> Animal Age < 90 Age >90
>>
>> Cow 3 1
>>
>> Sheep 2 2
>>
>> Total 5 3
>>
>>
>>
>> Is it possible to do that using calculated field (or other features of
>> pivottable). I wouldn't like to add any extra columns in the source table
>> to
>> calculate the age band.
>>
>> Regards
>>
>>
>>
>> Igor
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculated Field in a Pivottable aiddy1971 Microsoft Excel Misc 3 19th Jun 2009 09:17 AM
Calculated Field in a Pivottable aiddy1971 Microsoft Excel Discussion 2 19th Jun 2009 09:16 AM
Calculated Field in PivotTable DS Microsoft Excel Misc 0 10th Apr 2009 06:06 PM
PivotTable:Using a calculated field result in another calculated f =?Utf-8?B?QWxpY2U=?= Microsoft Excel Worksheet Functions 0 8th Jun 2006 05:21 PM
PivotTable - Calculated Field =?Utf-8?B?TWF0dCBNIEhNUw==?= Microsoft Excel Worksheet Functions 0 1st Feb 2006 03:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 PM.