Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Pivot Table Calculation based on 2 columns

Hello All,

I had created benign table, but of course, the powers at hand changed their
mind on their goals and have started asking questions that are presenting a
challenge. So, what I have are rows with a patient Id, visit and lab result.
I can easily group by ID and see a patient's before and after in a pivot
table. Where I get caught is creating the calculated field. What I would like
is for each individual to get the difference from the two visits, but it
would need to look at ID and visit, then subtract from the result column.
Here is an example of what the table looks like:

A B C
ID VISIT RESULT
001 Baseline 8.0
001 Week 34 12.1
002 Baseline 4.4
002 Week 34 2.3

The pivot table seemed like my best option to group and calculate, but if
someone has a better idea I am open to suggestions.

Thanks!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Pivot Table Calculation based on 2 columns

Excel 2007
Use Total with a negated number:
http://www.mediafire.com/file/zzvxunbzz5i/12_12_08.xlsx
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 49
Default Pivot Table Calculation based on 2 columns

Thanks Herbert, I knew it was probably me making it harder than it needed.
When you see the answer it hits me like an anvil.

"Herbert Seidenberg" wrote:

Excel 2007
Use Total with a negated number:
http://www.mediafire.com/file/zzvxunbzz5i/12_12_08.xlsx

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Pivot Table Calculation based on 2 columns

thanks, but I want to calcualte based on the group not the actual data
is that possible

"Lost in Microbiology" wrote:

Hello All,

I had created benign table, but of course, the powers at hand changed their
mind on their goals and have started asking questions that are presenting a
challenge. So, what I have are rows with a patient Id, visit and lab result.
I can easily group by ID and see a patient's before and after in a pivot
table. Where I get caught is creating the calculated field. What I would like
is for each individual to get the difference from the two visits, but it
would need to look at ID and visit, then subtract from the result column.
Here is an example of what the table looks like:

A B C
ID VISIT RESULT
001 Baseline 8.0
001 Week 34 12.1
002 Baseline 4.4
002 Week 34 2.3

The pivot table seemed like my best option to group and calculate, but if
someone has a better idea I am open to suggestions.

Thanks!!!

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 Table % Calculation cockatoo Excel Discussion (Misc queries) 0 October 21st 08 05:24 PM
Pivot Table Calculation Silena K-K Excel Discussion (Misc queries) 4 March 17th 08 06:48 AM
Pivot table calculation for difference between 2 columns &sources PivotUser Charts and Charting in Excel 1 January 8th 07 03:16 PM
Pivot Table % calculation jerry Excel Discussion (Misc queries) 2 October 7th 05 06:25 PM
pivot table % calculation boris Excel Worksheet Functions 0 March 3rd 05 06:40 PM


All times are GMT +1. The time now is 12:06 AM.

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

About Us

"It's about Microsoft Excel"