Pivot Table Calculation based on 2 columns

  • Thread starter Lost in Microbiology
  • Start date
L

Lost in Microbiology

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!!!
 
L

Lost in Microbiology

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.
 
W

WINDMILL

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top