13 Replies Latest reply on Jul 17, 2017 5:12 AM by suvas.chandra

# Percentage Calculation

I have Grand Total of all the rows like this:

Now, I have to calculate the percentage and need to place below the Grand Total in a separate row. But the calculation is different. It will be based on the right most column.

Example:  105471 /106333 *100 % = 99.189 %,

24/106333 *100 = 0.022% and so on and the last one (below 106333) should be 100%

How can I do this ?

• ###### 1. Re: Percentage Calculation

Any idea ? BTW, Right most value is: 106333. You should be able to see if you click on the screen print.

• ###### 3. Re: Percentage Calculation

That is the problem. I cannot make data out of the client machine.

• ###### 4. Re: Percentage Calculation

Make an example out of superstore set

• ###### 5. Re: Percentage Calculation

Hi Suvas,

I created a sample workbook with similar context as your image, using superstore data. The rows in your screenshot corresponding to year in my workbook. Columns in your screenshot is equal to the product category in my workbook. The values highlighted in yellow in your image is equal to the total profit by category in my workbook. One you hover on each cell you could find the description of each cell. Hope that makes sense. Let me know if you have any questions.

https://public.tableau.com/shared/29SWP4K7Z?:display_count=yes

Thanks,

Mani

• ###### 6. Re: Percentage Calculation

Mani,

Thanks for your input. But, that is not what I am looking for. I have created a sample dashboard. Here is the link:

Basically, in a separate row under (below) Grand Total, I have to calculate percentage for every month with respect to the Final Grand Total.

Example:  For January: 6213/297848*100 = 2.08%

For April: 7300/297848*100 = 2.45%

For Grand Total (the right most column): It should be 100%

I hope I was able to explain.

Please note that in my original Dashboard/view, all the fields are independent and are calculated separately. All January, February, March etc are calculated fields and used independently. Even the right most Total is a calculated field (did not use the menu in my original report). But, Subtotal and Grand Total (Bottom one) is calculated using menu option.

Thanks

• ###### 7. Re: Percentage Calculation

Hi Suvas,

I am sure this is what you are looking for. You see negative values in the percentage because overall net may be negative in the month and year. The way you do it is by clicking the Analysis option on the top and Percentage of, then choose your interested level of table calculation.

https://public.tableau.com/views/Percentageofprofit/Sheet3?:embed=y&:display_count=yes&publish=yes

Thanks,

Mani

• ###### 8. Re: Percentage Calculation

Small correction. Go to percentage of option and select by Row to show each month and year combination contribution against total profit.

• ###### 9. Re: Percentage Calculation

Small correction. Go to percentage of option and select by Row to show each month and year combination contribution against total profit.

• ###### 10. Re: Percentage Calculation

Mani,

Thanks for your effort. My dashboard is slightly different. All the months value were calculated independently. It is not easy to calculate percentage. Also, I need percentage only for the last row (Grand Total). You have calculated for the entire worksheet. I have created a dashboard which is 95% same as my required dashboard. Only field names are different. The original dashboard is all about counts. Please have a look and see whether there is any way to do the percentage:

Tableau Public

This is the screen print of the original requirement:

• ###### 11. Re: Percentage Calculation

Is this what you are expecting?

• ###### 12. Re: Percentage Calculation

Hi Hari,

Thanks for your input. It should look like that. But I have more dimensions and different measures to consider. Do you mind to do the same with my dataset that I uploaded to Tableau public ?