3 Replies Latest reply on Feb 17, 2016 3:21 AM by Tableau kumar

# Need to add another column to show the percentage. In this chart, the last column is the difference in revenue between July and August. I am trying to show in Tableau is the percentage of each row (Products) in the total difference. As an example, what is

Hi Techs,

Need to add another column to show the percentage. In this chart, the last column is the difference in revenue between July and August. I am trying to show in Tableau is the percentage of each row (Products) in the total difference.

As an example, what is the percentage of Product A difference (\$2,658,370) in the total difference (\$10,585,571).

• ###### 1. Re: Need to add another column to show the percentage. In this chart, the last column is the difference in revenue between July and August. I am trying to show in Tableau is the percentage of each row (Products) in the total difference. As an example, wha

Share us , which fields are coming from Data source, which calculations are you creating at Tableau level?

Best Regards

Kumar

• ###### 2. Re: Need to add another column to show the percentage. In this chart, the last column is the difference in revenue between July and August. I am trying to show in Tableau is the percentage of each row (Products) in the total difference. As an example, wha

Hi Kumar,

Thanks for the reply. I cant able to get the data because the data is from an 3party person i got only the twbx file im working on it.

Actually this calculation has been done from table calculation in Revenue measure.

Calaculation type: Difference From

Calculate the difference along: Table(Across)

Display the value as difference from: Previous

The revenue in july month is \$2,752,036 and in August month is \$93,666. So the difference is the \$2,658,370.

If we sum up the overall difference for all the products in the corresponding July and August month we will be getting Grand total as \$10,585,571.

So here we need to add a new column to show what is the percentage for each row with corresponding to the Grand total as \$10,585,571.

• ###### 3. Re: Need to add another column to show the percentage. In this chart, the last column is the difference in revenue between July and August. I am trying to show in Tableau is the percentage of each row (Products) in the total difference. As an example, wha

Hi,

1) Drag the Month on to row shelf.

2) then Drag the Sales on to Text marks shelf Self.

3) Create another calculated field as below to get the desired result.

sum([Sales]) / window_sum(sum[Sales] - lookup(sum([Sales], -1)))

4) Now drag the above new calculated field  Text marks shelf Self then you can see desired the result on the view.

5) If want to show on % basis, then right click on the Calculated field on the Measures pane, then click on "Change default properties" then click on "Number Format" then click on "Percentage"

Best Regards

Kumar