8 Replies Latest reply on Jul 20, 2016 7:15 PM by Shesil Parmar

# How to calculate % of total ?

Hi,

I'm struggling to calculate % of total sum. I have attached a sample book if someone can assist me !

I have created 3 calculated field but still unable to achieve what i'm after.

so basically i want, % of P1, T1 and MD1 of that selected month, i do get % but its based on total count (its field name actually) so whenever i change month or charge group , it changes % as well.

this is what is should be

 ChargeGroup Jan-16 Feb-16 May-16 Dec-15 P1 0.00% 0.64% 25.04% 2.41% T1 1.77% 19.42% 21.35% 1.77% MD1 17.01% 2.73% 4.17% 3.69%

thank you so much

• ###### 1. Re: How to calculate % of total ?

It's built-in, no?

• ###### 2. Re: How to calculate % of total ?

Yes there is i have already tried that,it gives me correct % only when all filters are selected. when i change something in filter it changes % as well - it appears it shows % of running total but i dont know how to fix that.

• ###### 3. Re: How to calculate % of total ?

Please provide sample workbook with a viz that does not show you what you need and explain what would you like to see.

Also, have you seen this menu?

• ###### 4. Re: How to calculate % of total ?

I have already attached a workbook !

did i miss anything ? this is first time i'm using this forum so not sure but i have attached sample tableau workbook and s/sheet in question.

• ###### 5. Re: How to calculate % of total ?

Well I attached workbook where viz looks exactly the way you wanted and then came back with new requirements - something to do with numbers changing when filtered.

So what numbers do you expect here?

• ###### 6. Re: How to calculate % of total ?

This should be the output...

 110 Dec-2015 Jan-2016 Feb-2016 May-2016 P1 1.61% 0.00% 0.48% 4.49% T1 0.00% 1.77% 19.42% 18.62% MD1 3.69% 1.12% 2.25% 1.44% 120 P1 0.80% 0.00% 0.16% 20.55% T1 1.77% 0.00% 0.00% 2.73% MD1 0.00% 15.89% 0.48% 2.73%

I do get % but when i put filters on ID, month or charge group it changes the %

• ###### 7. Re: How to calculate % of total ?

OK, now we are finally getting somewhere!

Correctly formulated question is half the answer

Workbook attached.

Resources used:

Enjoy!

p.s. there's also custom sort on Month and Charge Group just so it aligns with what you've been posting

1 of 1 people found this helpful
• ###### 8. Re: How to calculate % of total ?

Thank you so much Dimitry... really appreciate your help !

1 of 1 people found this helpful