3 Replies Latest reply on Jul 5, 2017 9:05 AM by Karthik Venkatachalam

    Hide Calculated Fields

    sebastian.simon

      Hi there,

       

      I'm new here so I'd to apologize if my issue is already listed out there. (After a resultless research) I'd ask if it's possible to hide calculated fields (because in my case the option is always greyed out when I select one.

      I'd need this option as I'm facing problems creating a simple auto-adjust function of diagram values (they differ a lot, so I wanted to create a calc. field to shrink or raise them by 10/100/1000, and as I've learnt that aggregation and if-statements don't live in peace with each other, I just wanted to put the action (out of the if statement) in an extra field to avoid results that are...suprising). Unfortunately the chain of therefore calculated fields show up in my quick filter for the measure names. Just, I don't want the user being able to add these fields to the diagram.

       

       

      Soooo. firstly, thanks for reading and any help is appreciated :-)

       

      Sincerely,

       

      Sebastian

        • 1. Re: Hide Calculated Fields
          Catherine Rivier

          Hi Sebastian,

          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

          http://community.tableau.com/ideas/1274

           

          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.

          1. 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.
          2. 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]

          end

             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!

          Catherine

          • 2. Re: Hide Calculated Fields
            Joshua Ng

            Wow Catherine, that is a brilliant workaround!

             

            Thanks!

            • 3. Re: Hide Calculated Fields
              Karthik Venkatachalam

              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.