![]() |
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!!! |
Pivot Table Calculation based on 2 columns
|
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 |
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!!! |
All times are GMT +1. The time now is 10:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com