forums
Use these forums to ask questions and discuss Tableau.
Hide small values (for data protection purposes)
Posted March 19th, 2008 by acotgreave
Hi,
We use Tableau to report on student numbers in our university (gender, ethnicity, domicile, etc.)
In order to comply with data protection laws if we are producing a table of ethnicity by Department, we need to "hide" any values that are less then or equal to 5 and replace it with an asterisk. The value DOES get included in the Totals for the row/column.
For example, say our Humanities division has three Chinese Asian people and 200 others. The Humanities row would have an asterisk in the Chinese Asian cell but the Grand Total would be 203.
I am pretty sure Tableau won't be able to do this - am I right?
Andy
Comments
Hi Andy,
Actually, I think I have a solution that will help you that involves writing a custom calculation. What you want to to do is create a calculation that returns Null when the number of students is less than or equal to 5.
Here's how it works:
IF COUNT([Number of Records]) <=5 THEN NULL ELSE COUNT([Number of Records]) ENDYou can see that any values less than or equal to 5 are left blank. So now you need to get that asterisk.
I've attached a packaged workbook that uses a similar example except instead of ethnicity by department it shows gender by major. You can see the calculation I made by right-clicking the Number of Students measure in the Data window and selecting Edit.
Hope this helps!
That solution is perfect. I had been concerned that this would end up being a showstopper, but, well, once again, it all seems to have been thought of by Tableau!
I hadn't come across the Special Values area in the Format Pane tab - very useful!
Thanks