In the below screenshot we can see a simple table showing the sales of chairs, blinders, fasteners, accessories and machines broken down by segment:
![](https://www.thedataschool.co.uk/content/images/2022/03/Picture1-2.png)
Once sales was dragged and dropped onto the text, Tableau defaulted the calculation to be the SUM. In many cases this will be what is needed, but in this case we want to be able to view for each category and sub-category, the percent of total sales by segment. (Full explanation of this reading can be found here - https://www.vizwiz.com/2017/02/table-calcs.html). For this we must right click on sales, then under quick table calculation, select percent of total:
![](https://www.thedataschool.co.uk/content/images/2022/03/Picture1-3.png)
At this point we can see that Tableau has acted as we intended it to. A quick eye test on the consumer row confirms that our percentages for chairs, blinders, fasteners, accessories and machines are totaling 100%:
![](https://www.thedataschool.co.uk/content/images/2022/03/Picture1-4.png)
BUT DO NOT STOP HERE!
There is more work to be done. Just because Tableau has conducted the calculation as we wanted we need to LOCK IT IN. Right click onto sales and select to edit the table calculation:
![](https://www.thedataschool.co.uk/content/images/2022/03/Picture1-5.png)
The below window will pop up:
![](https://www.thedataschool.co.uk/content/images/2022/03/Picture1-6.png)
Reading through this we can clearly see that for this calculation, Tableau is showing us for each category and sub-category, the percent of total sales by segment. But this is not the end, we now must LOCK IT IN. To do this, we need to click onto specific dimensions then close the table calculation window:
![](https://www.thedataschool.co.uk/content/images/2022/03/Picture1-7.png)
Now we are free to create whatever graph or chart is needed, knowing that Tableau will retain the table calculation. If we do not LOCK IT IN we run the risk of Tableau altering the calculation, causing all kinds of trouble and confusion down the line.