Search code examples
data-visualizationtableau-api

Redaction in Tableau


I am currently in the process of building some Tableau workbooks where we will need to redact visualizations or text tables if the results fall below a certain threshold (e.g. only ten data points are returned after filters are applied). Does anyone know how to create calculated fields or know of other methods to redact in Tableau?


Solution

  • You can create a threshold filter that compares the number of filtered responses to a threshold value set in a parameter.

    First, create a parameter with integer data type and set it to the desired threshold. In this example, I called it Count Threshold.

    Then create a calculated field for the filter with an equation like the following:

    {FIXED: COUNTD([Respondent ID]) >= [Count Threshold]}
    

    (I did this for survey results where we needed to hide results if the filtered number of respondents was fewer than 10.)

    For the threshold filter to be applied after your other filters, choose "Add to Context" for your other filters.