9 Replies Latest reply on Jan 21, 2014 1:18 PM by Nicholas Abbott

# Simple Calculation of working out a % with Grand Totals and a free fill number

Hi everyone,

Being fairly new to Tableau, I'm wondering if you can help me and if you have had the same queries...

I have a table (attached is a screenshot) showing you the grand total of certain information. I am wanting to divide the grand total by the total number of apartments which is a fixed number - say its 519, however, I do not know how Tableau calculations would do this.

Eg. Grand Total: 177 / 519(free fill number) * 100

• ###### 1. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Hi Nicholas,

You can check this link for custom Grand Total : - Custom grand total

For more learning, check these links : - Customizing Grand Totals – Part 1 | Drawing with Numbers

Customizing Grand Totals – Part 2 | Drawing with Numbers

In your question, just go to "Analysis" from menu options. Go to "Totals" -> "Total All Using" -> click "Average".

Hope this may help!

Warm Regards,

Prashant Sharma - India | LinkedIn

• ###### 2. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Hi Prashant,

Thank you for your reply. Whilst it was helpful, I am still left puzzled. My query is, if i have a grand total of 177 apartments that have been sold - "Exch" and there are 500 apartments in total to be sold I need to do a simple calculation working out the %  of apartments sold.

Can I create a calculation where I can say: SUM (Grant total "Number of Records") / 500) * 100 or something similar?

The number 500 would not be shown below,  it would be a number that is put into the calculation.

Hope you can help me!

• ###### 3. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Hi,

Create another sheet & use the following calculation: -

(window_sum(sum([Sales]))/500)*100

In a dashboard put your this sheet under previous sheet. Can you please attach a sample workbook so that I can help you in achieving the same according to your dataset.

Hope this may work for you!

Warm Regards,

Prashant Sharma - India | LinkedIn

1 of 1 people found this helpful
• ###### 4. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Hi Prashant,

Hope this reaches you as I keep getting error messages when uploading the twbx file…

Your calculation worked however how can I bring the % either below the Grand Total or just above the Grand Total or will I have to format the new sheet showing just the % and float it below the original sheet so it appears where I want it to appear, if that makes sense ☺

Kind regards,

Nicholas Abbott

• ###### 5. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Prashant,

I’m also wondering why the %’s do not appear to the side when having the grand total to the side? They appear when the grand total is at the bottom but not the side? Do you know how I can do this? If this can be achieved than you would make my life so much easier!

Easy for some I know but for beginners to Tableau not that easy, I hope you understand ☺

Kind regards,

Nicholas Abbott

From: Nicholas Abbott - Crown Group

Sent: Tuesday, 21 January 2014 8:21 AM

To: @community.tableausoftware.com'

Subject: RE:  - Simple Calculation of working out a % with Grand Totals and a free fill number

Importance: High

Hi Prashant,

Hope this reaches you as I keep getting error messages when uploading the twbx file…

Your calculation worked however how can I bring the % either below the Grand Total or just above the Grand Total or will I have to format the new sheet showing just the % and float it below the original sheet so it appears where I want it to appear, if that makes sense ☺

• ###### 6. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Your answer to get the Grand Total % was great! Thank you Prashant, however, one slight hurdle   to get the individual %s of (Number of Records - Exch) rather than the total number of records, how can this be done?

Eg. 71(Number of Records Exch) / 500 * 100

104(Number of RecordsExch) / 500 * 100 etc..

If this can be done, it would be most ideal?

Thank you once again for all your assistance, its greatly appreciated.

• ###### 7. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Sorry for late response Nicholas. Time difference of locations between us is the issue.

Let me check what you have done till far & will revert back to you.

Warm Regards,

Prashant Sharma - India | LinkedIn

• ###### 8. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Hey, your workbook is asking for credentials. However,Please explain "Number of Records - Exch" field. For getting your desired result, create a calculated field & remove window_sum from your calculation which you are using for the total. Hope this may help!

Warm Regards,

Prashant Sharma - India | LinkedIn

• ###### 9. Re: Simple Calculation of working out a % with Grand Totals and a free fill number

Thanks Prashant! for all your help with this. Worked perfectly.

I have another more complex query but i wont bore you with it lol