forums
Use these forums to ask questions and discuss Tableau.
Calculations including Grand Totals
Posted November 1st, 2007 by Ricky Coppola
in Calculations
I have data that looks like this:
| Category | Value |
|---|---|
| Cat 1 | 2 |
| Cat 2 | 3 |
| Cat 3 | 5 |
| Cat 4 | 7 |
I need to show the distance of each value from the average of all values...like this (Avg. is 4):
| Category | Value | Distance |
|---|---|---|
| Cat 1 | 2 | -3 |
| Cat 2 | 3 | -1 |
| Cat 3 | 5 | -1 |
| Cat 4 | 7 | -3 |
I have tried table calculations, but can't seem to get it. How can I achieve this ?
Comments
I have another question on this. I am getting different total amounts when i add a certain field to a table row but use all the same filter values. For example:
Then I want to break these SC sales down by Customer, so I drag Customer to the Rows shelf & get this:
When I view the underlying data on both, the table including customer excluded 2 rows (for the same customer) that were included previously. These 2 rows make up the discrepency, but all of the filters are set the same.....why were they excluded ?
Love the tool....Thanks in advance !