3 Replies Latest reply on Apr 23, 2018 10:04 AM by Matt Lutton

    Parameter for Hierarchy but keeping single value filters

    Daniel Lawrence

      Hello all,

       

          I am having a problem with parameters in a hierarchy with (what I hope to be) dependent filters.  I have attached a sample workbook with superstore data to illustrate the situation.

      The hierarchy is the category hierarchy and my goal is to be able to look at only one displayed value regardless of the level of hierarchy or filter chosen.

      Currently, I have two filters and one parameter.  The parameter determines the level of hierarchy, the first filter determines which category, and the second filter determines which subcategory of the already determined category (e.g. only relevant values are checked).

      The problem I am encountering is this:

      • I originally had single value only dropdown filters in place which would allow only one value to be viewed (which is ideal for the dashboard design in question).  Unfortunately, when I make the subcategory filter a single value dropdown filter it immediately applies itself to the category value when I have the parameter chosen as category and the value displayed is no longer an aggregate across said category but is instead just the subcategory value displayed with the category header.  This results in a correct value and display when parameter is subcategory, but a correct display and incorrect value when parameter is category.
      • To alleviate the above problem, I made the subcategory filter multiple value dropdown but then there is the possibility (and probability) that the user will select more than one value which would disrupt the dashboard design.  This could (and most certainly would) result in the correct value and display when the parameter is category, but an incorrect display and correct value when parameter is subcategory.

       

      Can anyone shed some light on how to utilize single value filters but only have the subcategory filter in play when the parameter is designated subcategory?  I want to create a calculated field but I do not know how to turn a filter on or off in this regard.

       

      Thanks for any and all input!

        • 1. Re: Parameter for Hierarchy but keeping single value filters
          Matt Lutton

          I've taken a look but am having a bit of a hard time understanding the issue.  Does removing the "only relevant values" option on Category help at all?  That will make it easier to select Sub Category in the parameter and only see relevant values, but the Category filter will need to be set to "All", otherwise, the Sub Categories shown will change.  Is that the issue?  If so, it is by design, but you could always try and add a sub-title or caption that tells the users how to interact with the objects.

           

          Let me know if I am misunderstanding the issue -- hopefully, someone else will jump in and try to help as well!

          • 2. Re: Parameter for Hierarchy but keeping single value filters
            Daniel Lawrence

            Matt, I do not think that solves the issue.  What I am trying to accomplish is to have the same metrics displayed for Category or sub-Category but for only one chosen value within each strata.  The parameter is the way of defining which strata the end user wants to view.  I would like it to be a situation where the user chooses the category first (because that is a necessity regardless of which strata is looked at), which strata they want to look at, and then, if necessary, what sub category they want to look at.  The problem is I want to only have one value displayed in the end result, not values for all of the subcategories when looking at the sub category strata.  That is easily accomplished with two filters (one for category and one for subcategory) but then when I want to switch back to category via the parameter, the sub-category filter is still active and does not show an aggregate value over the entire category but shows just the two filtered (category and subcategory) value with the heading changed from subcategory header to category header. 

             

            Essentially what I want to accomplish is have the parameter turn on the subcategory filter, when the subcategory strata is chosen and when category strata is chosen, the filter return to ALL status.

            I have tried to do it via a calculated field as it seems to be something that should be programmatically possible but I have not had success yet.

            • 3. Re: Parameter for Hierarchy but keeping single value filters
              Matt Lutton

              Anything is possible in Tableau with enough work, but I believe you are correct in that it won't be easy/a simple menu option.  Via sheet swapping, and popping in filters for various selections, it would be possible -- but I am not going to suggest that, as it's way too much work for what you're after.  I'd try to find a happy medium, giving your users the guidance they need with what is possible currently.

               

              That being said, if someone else wants to jump in and solve this, feel free