5 Replies Latest reply on Oct 7, 2014 7:56 AM by Matt Lutton

# Difference between two table calculations

I have what is probably a simple question, but I sure can't figure it out.  Hoping for some help in syntax.

I have two columns, each with their own table calculation, that results in the Percent of Total (Pane) Down.  I want a third column that is the DIFFERENCE between the prior two.

Column 1:  COUNTD([Unique Student Events]) / TOTAL(COUNTD([Unique Student Events]))

Column 2:  COUNTD([Person ID]) / TOTAL(COUNTD([Person ID]))

I can't seem to figure out how to subtract column 2 from column 1 as a calculated field.  Something like this:

(COUNTD([Unique Student Events]) / TOTAL(COUNTD([Unique Student Events])))  -  (COUNTD([Person ID]) / TOTAL(COUNTD([Person ID])))

• ###### 1. Re: Difference between two table calculations

Can you post a sample packaged workbook?  Superstore Sales can be used to replicate two calcs like this.  From there, it will be much easier to help.

• ###### 2. Re: Difference between two table calculations

Ignore my comment about LOOKUP, it may not apply here.  Seeing your data and the type of view you're working with will help others come up with the results you're after.  I'll take a look if you can post an example packaged workbook; cheers!

• ###### 3. Re: Difference between two table calculations

I am attaching superstore data here & solution which will help you in getting correct values. In your worksheet you have to check that both are computed correctly or not in the third calculation.

Warm Regards,

Prashant Sharma - India | LinkedIn

1 of 1 people found this helpful
• ###### 4. Re: Difference between two table calculations

Thanks, guys.  Knew this would be easy for you Masters.

Was just getting ready to post the twbx when I saw the solution here.

• ###### 5. Re: Difference between two table calculations

There are several ways you might approach how you calculate this, but I'm glad you found a solution that works for you.