Dynamic hide/show of null value columns in Tableau
top of page
  • Bernard K

Dynamic hide/show of null value columns in Tableau


dynamic hide/show of null value columns in Tableau

Introduction

The goal of this article is to demonstrate how to hide and show columns containing null values in Tableau tables. To demonstrate this, I have created the dummy dataset below.

sample dataset

(Notice, this table contains details up to Sub-Category level for West Region, while East region’s data is captured up to Product level, with Central region combining products with quantities ordered. Meaning, if you’re to present this information in table format for each region – you’ll end up with tables containing null value columns as shown below).

(Which is not the best way to present the data – the perfect way would be to hide the null value columns and show them whenever they are required)

The Problem – how to hide/show null value columns in Tableau

There is no straight forward technique that you can use to hide and show null value columns in your Tableau tables. However, there are some tricks that you can use to deliver a product that offers the same user experience by leveraging sheet swapping.

To do that, first create separate worksheets presenting data for each Region as shown below.

Use Parameter to hide/show worksheets based on the selected values.

Create a parameter.

create a parameter in tableau

Create a Boolean calculation to hide/show worksheets based on the selected value on the parameter.

create a boolean calculation in tableau

Add this calculation to each worksheet as a filter and select ‘TRUE’

(Notice, the worksheets remain visible whenever the parameter value is the same as the Region on the filter, and remains invisible if otherwise).

Combine the three worksheets on the dashboard

Open a new dashboard, and add a vertical or horizontal layout container.

  • Next drag the three worksheets into the layout container.

  • Hide the titles.

  • Show the parameter ‘Select Region’

(Using the parameter – you can seamlessly swap worksheets, giving the impression of hiding and showing null value columns - when in the real-sense you’re simply swapping the different worksheets.)

Conclusion

If this post was helpful and you would like to receive more of these Tableau tips and tricks, kindly subscribe to our mailing list below.

If you like the work we do and would like to work with us, drop us an email on our Contacts page and we’ll reach out!

Thank you for reading!

Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page