2 Replies Latest reply on Nov 8, 2018 1:12 PM by Ryan Blank

# Calculate Percentage of Subtotal by Category

Hello,

I'm trying to create a calculation to get the percentage of the subtotal for each category.

I have attached a sample copy of the Superstore data with a basic table to illustrate. What I'd like to see if % of sales of each category listed on the sub-category line. So for instance, Bookcases would be 22.7% of Furniture sales for 2018.

Is there a way to do this via creating a calculated field instead of using quick table calculations? I ask because my actual project is more complex with several unions.

Thank you,

Ryan

• ###### 1. Re: Calculate Percentage of Subtotal by Category

Ryan- Any reason why you have "Difference From" Quick Table Calc in your view and not actual SUM(Sales)?

I have cleared the Quick Table Calc on SUM(Sales) which now gives actual sales numbers. Then I created a Calc field that does the "% of Sub-Total" which is computed using Sub-Category.

Ryan Blank wrote:

What I'd like to see if % of sales of each category listed on the sub-category line. So for instance, Bookcases would be 22.7% of Furniture sales for 2018.

So in 2018 Bookcases contributed to 13.94% of total Furniture sales.

Hope this helps.

Best,

Shiva.

• ###### 2. Re: Calculate Percentage of Subtotal by Category

Thanks Shiva. Not sure how/why I had the difference from calc in there. Probably just me rushing.

This worked perfectly. I appreciate your assistance.

Ryan