7 Replies Latest reply on Jul 26, 2018 5:39 PM by Zhouyi Zhang

# Calculated Field: Show a percent of total records shown after filtering

I have two filters I am applying to a large data set. I'd like a separate worksheet panel in my dashboard which shows me what percentage of the total number of records are being shown in the main info panel of the dashboard after filtering. This could be accomplished using a 2x2 grid showing the breakdown of users, but I'd like it to look a bit more professional than that. I've never used the Tableau calculated field syntax and it's very confusing!

e.g. if 75% of users have their last event w/ in 30 min and 50% are original trials vs collaborative trials, then the new worksheet panel would display a bar with a label of '37.5%'

• ###### 1. Re: Calculated Field: Show a percent of total records shown after filtering

Hi, John

Can you provide a sample workbook?

ZZ

• ###### 2. Re: Calculated Field: Show a percent of total records shown after filtering

Thanks Zhouyi,

I've attached an excel doc that I hope shows what I'm trying to do.

Supposing I was working with 'Sample Workbook.xlsx' if I filtered by:

filter 1 == 'Foo'

filter 2 == 'Local'

filter 3 == 'Carbonated'

A tile in my tableau dashboard would show me the percentage of total records that abide by that criteria.

In the case above, the percentage would come to '14.2%'

• ###### 3. Re: Calculated Field: Show a percent of total records shown after filtering

Hi, John

Thanks for the data.

Please find my solution attached. one thing I don't get it is how you calculate the % of 14.2% in your screenshot, 5 of 30, the percentage should be 16.67%, need you confirm.

ZZ

1 of 1 people found this helpful
• ###### 4. Re: Calculated Field: Show a percent of total records shown after filtering

Thanks again, Zhouyi. It is indeed 16.67% with the sample I provided. Must've been in a rush yesterday

• ###### 5. Re: Calculated Field: Show a percent of total records shown after filtering

Hi, John

ZZ

• ###### 6. Re: Calculated Field: Show a percent of total records shown after filtering

Will do! Sorry for the delay.

• ###### 7. Re: Calculated Field: Show a percent of total records shown after filtering

thank you

ZZ