So this is something I was always hoping would be added to Tableau's functionality in an easier way. In fact, it's been in the ideas section for a while now, so if you'd like it too, you can vote for it
There are two ways to deal with this that I know of.
The first is easy to do, but can be difficult to maintain (since it involves hiding fields in the source, so it will affect other views):
In the sample workbook, I have 2 copies of the Superstore sample data. The first I am leaving as is, and the second I am using to hide the measures.
In this solution, we'll hide those Measures so they won't show up. The key is here is order. FIRST (without having any visualizations) you hide the Measures you don't want to see, and do that in the Measure field list. It may sound nit-picky, but don't have any values in your sheet or this won't work - you'll see the Hide option is greyed out - which sounds like what you're seeing above.
In this example (sheet "Option #1: With Hidden Fields") I hid Discount, Order Quantity, and Product Base Margin. To do this, right click on the Measure name, and hit hide. It will completely disappear from the Measures shelf. Now, it will likely make your life a lot easier to see the hidden measures in your Measures list. So to do this, right click on any white space in Measures, and select Show Hidden Fields. They'll show up in grey, like you see in the sample workbook, but at least you'll be able to see them and work with them.
Now make your view as you normally would, and when you create a Quick Filter on Measure Names, only the non-hidden fields will show up.
The second solution involves parameters, which can be really difficult to set up the way you want. But it won't affect any other view from that data source. In sheet "Option #2: With Parameters" I created a few new fields.
- Two identical Parameters, called Measure #1 and Measure #2 (add as many as you want). These are populated with string values corresponding to the Measure Names I want to use.
- Two nearly identical Measure, called Select Measure 1 and Select Measure 2. These are simple IF statements pointing the parameter to the Measure you want, like:
If [Measure #1]='Discount' THEN [Discount]
elseif [Measure #1]='Order Quantity' THEN [Order Quantity]
elseif [Measure #1]='Product Base Margin' THEN [Product Base Margin]
elseif [Measure #1]='Profit' THEN [Profit]
3. Now you can treat these as standard Measures, as you can see in the view.
Note it's also a little complicated to get the names of the selected measures to show up. To get around this, you may have to be a little complicated in a dashboard, lining up your parameter selection boxes with the view. See "Option #2 Dashboard" for a very rough idea.
Hope this helps!
SelectableMeasures.twbx.zip 1.1 MB
Wow Catherine, that is a brilliant workaround!
This is definitely a good workaround, thanks for posting it. Will be very useful for folks.
Also from an observation point of view, would like to mention this. People seem to think there is always a workaround to every problem we face, so let us go and get it. But, when building a data product/portfolio of solution, few months/years down the line, imagine having workbooks with a bunch of non-standard solutions (however innovative/ clever/ elegant a fix might be), eventually leading to tonne of other issues and constraints stemming from it. From a system theory perspective, managing solution complexity, one has to weigh if a workaround is worth pursuing or not. Right approach is to acknowledge the problem as-is and up-voting an idea/ wait for a clear fix from the product suite (Tableau). In this case, Tableau needs to provide a standard way to hide columns.