5 Replies Latest reply on Aug 2, 2017 8:33 AM by Phillip Raywood

    Show only relevant Measure Names in Filter

    David Peeples

      I've created a viz that shows different health stats by county in a map view (http://public.tableausoftware.com/views/CountyHealthData/CountyHealthStatistics). I have used measure names as a filter, but would like to limit the available measure that show in the filter. I know how to filter show only relevant values when using a standard dimension as a filter, but am unable to figure it out when using the "measure names" as i cannot duplicate measure values.

       

      Hopefully i'm just missing something very simple.

       

      I would like only the following measure to be available for selection (Percent Children in Poverty, Percent Obese, Percent Smokers, and a few others). Any help is greatly appreciated.

        • 1. Re: Show only relevant Measure Names in Filter
          Richard Leeke

          If you hide the other measures in the data window they will no longer show in the measure names filter. That may not completely solve your issue, but it should help, I think.

          1 of 1 people found this helpful
          • 2. Re: Show only relevant Measure Names in Filter
            David Peeples

            Richard, thanks for the response. However, I don't believe I'm able to hide the measures that I want to hide because the measures I want to show are table calcs based on the original measures.

            • 3. Re: Show only relevant Measure Names in Filter
              Joshua Kitz

              Question is a couple years old but still seems relevant. I am going to answer David's question in a way I think will solve it, but this won't help a user that wishes to allow the user to select multiple measures.

               

              Proposed Solution:

              1. Create a parameter, call it "Select a Measure."

              2. In the parameter window select string, and list. Type each of the measures you wish the user to be able to display in the parameter list.

              3. Create a calculated field called "Selected Measure."

              4. In the calculated field write an if statement along the following lines:

                        IF [parameter].[Select a Measure]='% Children in Poverty' THEN [Percent Children in Poverty]

                        ELSEIF [parameter].[Select a Measure]='% Obese' THEN [Percent Obese]

                        END

              The point is that each measure in your parameter appears in the about calculation and points at the appropriate field name.

               

              You use the parameter as your 'filter' to select the appropriate measure.

              You use the calculated field in the visualization.

               

              The Complication:

              If you are providing a mix of whole numbers, percentages and money, and you want to label the visualization appropriately then you'll need a second set of calculations.

               

              1. Duplicate your "Selected Measure" calculation, call it "Selected Measure label %"

              2. Remove all parts of the calc that refer to any measures that are not percentages.*

              3. Place this on the label shelf.

              4. Repeat for all types of number formatting needed.

               

              *(Do not provide add an "Else", it will automatically be assigned a null and this is what we want)

               

              Hope that helps.

               

               

              I wish there was a simpler way to set this up. Also wish there was a way to do this when allowing the display of multiple measures.

              • 4. Re: Show only relevant Measure Names in Filter
                Shawn Wallwork

                Joshua, I 'liked' your post just because you dug out a 2-year-old post and took the time to answer it in a different way. Nice.

                 

                --Shawn

                • 5. Re: Show only relevant Measure Names in Filter
                  Phillip Raywood

                  The measure name filter is useful because it allows to select multiple measures for display. Is there a way to tweak your solution offering to do the same? Either I am missing something or your solution only offers a way to show one measure at a time per parameter selection.  Even if we are to duplicate the measure and parameter several times it becomes difficult to show the measure names.  There must be an easier way.