3 Replies Latest reply on Aug 23, 2018 5:53 AM by meenu choudhary

Calculation by using Categories

I have a data set which is categorizing the value according to a pre-defined range. Problem is to find out the number of invoices which falls under a specific bucket and its overall contribution in percentage and also the total value of each category and the contribution of that category in overall value in percentage.

Please refer to the attached Excel sheet for a demo calculation which need to be achieved in Tableau as column F & H in Excel.

• 1. Re: Calculation by using Categories

Hi Saikat,

Column "F" can be achieved by below logic:

{Fixed [Bucket]: sum([Number])}

But for column "H" i didn't got the logic on how you arrived at "21%" and "11%".

• 2. Re: Calculation by using Categories

Ignore 21% and 11%. It is a text.

But my question was if you count the numbers in Category 1-2MEuro then it is 4 and Total number of Invoices in 15.So, I want to show 4 is how much of 15 in Percentage that lies wthin the bucket.i.e===>

4/15=27%

• 3. Re: Calculation by using Categories

Saikat,

That you can calculate it by below logic:

sum({Fixed [Bucket]: sum([Number])}) / sum({sum([Number])})