10 Replies Latest reply on Jul 2, 2016 2:02 AM by Ashish Chaudhari

# How to calculate grand total percentage?

I have a structure like this in tableau

Total Projects(COUNTD(PROJECTID))
Date
approved projects(COUNTD(APPROVEDPROJECTID)
rejected projects COUNTD(REJECTEDPROJECTID)
Rejection Rate(COUNTD(REJECTEDPROJECTID)/COUNTD(APPROVEDPROJECTID))*100
10011-6-121505033%
30012-6-122007537%
Grand Total40035012570%

The issue I am facing is I don't need the SUM of rejection rate in  grand total. I know this is happening because I used a calculated field for Rejection Rate. I need the percentage of grand total instead of SUM ie, (125/350)*100=35%. How to do that calculation?

EDIT 1:

One thing to add I am also using analysis->Grand Total ->Total using -> SUM. when I click automatic this shows correct but ,

I need SUM since Grand Totals otherwise it will show COUNTD() of total rows. Any workaround?

Thanks

Biju

Message was edited by: Biju J

• ###### 1. Re: How to calculate grand total percentage?

Hi Biju,

Please find the attached file. there is nothing that I have done. I have created a simple calc and then taken the grand totals. Please refer to the below image.

SUM([Rejected Projects])/SUM([Approved Projects])

Please find the attached workbook for reference.

Thanks and Regards

-Ashish Chaudhari

• ###### 2. Re: How to calculate grand total percentage?

Ashish Chaudhari I am not using a SUM function in calculating approved and rejected projects , Its COUNTD(), still it will give the results?

• ###### 3. Re: How to calculate grand total percentage?

Ashish Chaudhari One thing to add I am also using analysis->Grand Total ->Total using -> SUM. when I click automatic this shows correct but ,

I need SUM since in  Grand Totals otherwise it will show COUNTD() of total rows. Any workaround?

• ###### 4. Re: How to calculate grand total percentage?

Total(CountD(Rejection ID)) / Total(CountD(ApprovedProjectID))

Let me know if this works.

-Ashish

1 of 1 people found this helpful
• ###### 5. Re: How to calculate grand total percentage?

nope. This won't work then. Can you assist me with workbook (sample dummy data) ?

-Ashish

• ###### 6. Re: How to calculate grand total percentage?

TOTAL worked. Thanks a lot.

• ###### 7. Re: How to calculate grand total percentage?

actually I missed the CountD thing in the Table header in the question.

-Ashish

• ###### 8. Re: How to calculate grand total percentage?

Oh, I was banging my head for this last 3 days. TOTAL LOD expression really helped.  So how the TOTAL worked , it took the COUNTD() first and summed it up?

• ###### 9. Re: How to calculate grand total percentage?

Yes, You got it right.