5 Replies Latest reply on Aug 20, 2018 6:24 PM by Ali raza

# Calculating Percentage from Total

Hi Guys I am very new to tableau. I cannot seem to a find a solution for a problem I am currently facing. Following is a dashboard  I built: I am trying to calculate the clickrate of total like this: But it gives me a very strange value.

All I need is to Divide the number of clicks of a certain ad for that week with the total no. of impressions for that week.

For example for the first ad I would do:

11/19911*100

Which should give me something like 0.055 %.

Please advise on how to achieve this. I will be very thankful.

Best

• ###### 1. Re: Calculating Percentage from Total

I am sorry I clicked on assumed answered by mistake.

• ###### 2. Re: Calculating Percentage from Total

You can Change That by Marking the Following Reply as Helpful and CORRECT, If it Helps

(SUM({FIXED Corpweek,Ad Id,Clicks:SUM(Clicks)})/ SUM({FIXED Corpweek,Ad Id:SUM(Impressions)}))*100

Thanks

Deepak

• ###### 3. Re: Calculating Percentage from Total

Hi Deepak

Thanks. This is what i used:

(SUM({FIXED [Corp Week],[Ad Id],[Clicks]:SUM([Clicks])})/ SUM({FIXED [Corp Week],[Ad Id]:SUM([Impressions])}))

It worked for all the other columns but now my subtotal and total columns are messed up: As you can see the Clickrate by week column, the total shows 2.19% but it should be:

543/19911 * 100 = 2.727%

Also the grand total is wrong. Is there another way to do this correctly? Please advise

• ###### 4. Re: Calculating Percentage from Total

place your cursor there and change from automatic to sum .

• ###### 5. Re: Calculating Percentage from Total

Hi Deepak

Unfortunately no, that doesn't work and adds all the percentiles which is wrong: It needs to be 543/19911*100

Please advise