2 Replies Latest reply on Dec 21, 2016 7:12 AM by suvarshika.n

# Problem in calculation

Hi All,

I have a small problem with tableau calculation field. The data in the attachment. As you will the data I need to calculate the percentage of the ESCAPED by divide the ESCAPED over the SUM(UR_ENTRY) for example(1002/1265872)*100 = 0.0791549224566149

When I created the calculated field I wrote the following:

1. To get the Escape "[SUM(UR_ESCAPED)]-[SUM(UR_ESCAPED_EXIT)]" I called this one as ESCAPED

2. To get the percentage "([ESCAPED]/([SUM(UR_ENTRY)]))*100" I called this one as Calculation 1

Finally the result is something wrong I have attach the result.

Can anyone help me in this issue?

Sultan

• ###### 1. Re: Problem in calculation

Hi Sultan,

Kindly share some sample data in .twbx format.

Mahfooj

• ###### 2. Re: Problem in calculation

Hi sultan ,

I have attached twbx file

Used 3 measures sales , profit and Quantity

sales - profit = SUM([Sales]-[Profit])

sales - profit/quantity= [sales - proft]/sum([Quantity]) then format it with percentage with 2 decimals

Thanks

Suvarshika