7 Replies Latest reply on Mar 28, 2014 8:52 AM by Shawn Wallwork

# How can I compute one column as a percentage of another?

Hello,

I'd like to do a calculation that shows what percentage of a column another column represents.  In the image below, for example, in the "Breast" row, I would like the result of the calculation 15/484 next to the 15.  If anyone knows how to label that column appropriately that would be swell too.

Thanks!

Hans

• ###### 1. Re: How can I compute one column as a percentage of another?

I know how to do both of those thing, but to help with your specific issue I need a bit more information, or even better, if you could mock up some sample data or use superstore sales to demonstrate your setup. Then I can include the same in my reply to give you an example of how to do. In leu of that, a wider screenshot which shows how things are arranged in Tableau might give a hint about your setup.

If these are separate measures, then it would just be sum([Measure2])/sum([Measure1]).

• ###### 2. Re: How can I compute one column as a percentage of another?

Hi Hans,

Warm Regards,

Prashant Sharma - India | LinkedIn

• ###### 3. Re: How can I compute one column as a percentage of another?

Thanks Noah, that worked.  Do you also know how to truncate the result to two decimal places and label it with the % sign?

Thanks again!

Hans

• ###### 4. Re: How can I compute one column as a percentage of another?

HI,

Go to Format of your new calculated field & change format as %.

Warm Regards,

Prashant Sharma - India | LinkedIn

1 of 1 people found this helpful
• ###### 5. Re: How can I compute one column as a percentage of another?

I do. So does Prashant. Glad this helped.

N.

1 of 1 people found this helpful
• ###### 6. Re: How can I compute one column as a percentage of another?

Thanks guys! Take care.

Hans

• ###### 7. Re: How can I compute one column as a percentage of another?

Hans when working with percent formatting you have to be careful:

QT: Working with Percent Formatting (& Facebook)

--Shawn

1 of 1 people found this helpful