Ever want to use Measure Names as a filter in Tableau? You want to provide a limited selection of measures to choose in the filter instead of all measures?
There is a way to do this:
- Set up the worksheet using Measure Names / Measure Values.
- In the Measures section, hide the measures that shouldn’t be visible in the filter; right-click on the measure name (or ctrl-click for bulk) and Hide.
- Put Measure Names on the filter shelf
- Show the Measure Names filter – and only those non-hidden measures will appear
Not able to hide a Measure?
If you right-click on a measure and Hide is greyed out, that means the measure is being used. Only those measures not in use can be hidden.
To resolve this, duplicate the data source and use the duplicate for your Measure Names filter.
If using a hyper extract, there’s no dashboard performance hit (or at least I’m not aware of one) having the same data source connected twice in the workbook. If saving as a twbx, a Tableau packaged workbook, this would clearly increase the size of that workbook.
Obviously, once a measure is hidden, it can no longer be used from that data source.
An alternative to the Measure Names filter is to create a measure selector using a parameter. However, that has the limitation of single selection.
Click through for the interactive report: