7 Replies Latest reply on Apr 27, 2018 3:29 AM by Mavis Liu

# Finding % of a sub divsion

Hi All,

I have Division A and Division B - i need to find out the total % for each division. I currently have Div A with 7 records that are yes and 2 records that are no, totally 9. So 7 /9 * 100 = 77%

But how do i put that in the calculation field so the 77% shows up for each division based on the yes and no's that make up the total number of records?

Thanks,

• ###### 1. Re: Finding % of a sub divsion

You'd need Quick Table Calculations, "Percent of Total" in particular. Refer to this document for reference. Attached the workbook.

I created dummy data in Excel and loaded into Tableau,

Click on "Number of Records" in Marks Card > Quick Table Calculation > Percent of Total > Click again on Number of Records > Edit Table Calculation > On the pop-up window > Select Specific Dimensions > De-Select Division and close the window.

This is how it should look,

Hope this helps.

Thanks,

Shiva Ram.

• ###### 2. Re: Finding % of a sub divsion

Hiya,

Here i have under the blue mark (call it Div A) 7 none files and 2 yes files.

I follow your steps for the table calc but it returns 100%

More than 7 days is the same as your response field in your example

. Also if i take the date out, tableau automatically counts the figures above rather than the number of rows? It gives me the overaall % when i need it at a row level right, as i know the first option is 77%

• ###### 3. Re: Finding % of a sub divsion

would something like this work?

If i divide the days of None by the subtotal rows for division then give me a total to turn in to a %?

• ###### 4. Re: Finding % of a sub divsion

Could you try this?

Create a calculated field, say "% of total", type this

SUM(CASE [Response]

WHEN 'None'

THEN 1 ELSE 0 END)

/ COUNT([Response])

change the number format to percentage. See if this works.

• ###### 5. Re: Finding % of a sub divsion

Hiya, that just returns 0%?

• ###### 6. Re: Finding % of a sub divsion

Hi Rebecca,

This will fix the general total number of records per division, and look at the total number of records for each type of response.

This will give you the row level % I think you're looking for. You can also remove that date field from the rows shelf and it'll give you correct result:

Please let me know if this works for you.

Mavis

InterWorks Europe

• ###### 7. Re: Finding % of a sub divsion

Sorry attached the workbook here! The first worksheet Row Level % gives you the LOD calculation which I mentioned in my previous response.

The second worksheet Number of Records % uses the same table calculation method as Shivaram.

If you have any questions, let me know!

Mavis

1 of 1 people found this helpful