2 Replies Latest reply on Oct 17, 2018 3:09 PM by Joe Oppelt

    Show Quick Filter values in the sheet else ALL

    Prakash Desai



      By default all the values for Region be selected. In that I would need to display Region:All else if few of the values selected from filter, then i would need to display the selected ones, as shown below.

      It will be great if any one has any inputs. Attached workbook.


        • 2. Re: Show Quick Filter values in the sheet else ALL
          Joe Oppelt

          You're getting what you see on Sheet 2 because Tableau is cycling through the regions and doing what your calc calls for.  Simple enough.

          But you are actually getting 1-through-5 marks on the sheet, depending on how many regions you selected.

          You want to get it down to one mark, and then you can control "ALL" or a list.


          In sheet 2 I made my own calc.  See [List].   This uses the PREVIOUS_VALUE function, and as it cycles through the regions, you can see that you get a growing list until it gets to the last region.


          Also look at two other calcs.  [Regions in data] and [Regions on Sheet].  These are LODs that tell me how many regions are in the original data (uses a FIXED LOD), and how many were actually selected  (Uses an EXCLUDE LOD.)


          Go to Sheet 2(2).


          Here I made [Full List].  It grabs the biggest of the 5 marks, and shoves it on all the marks.  Play with the filter to see how it looks.


          Go to Sheet 2(3).


          Here I added another calc called [index].  This gives me a 1-through-N count of the marls.  (I took [List] off the sheet at this point.  I don't need it displayed.)  On the next sheet I'm going to move [index] to filters and just display index=1.  We only need one copy of the list.  This is how I get one mark (mentioned earlier.)

          Go to Sheet 2(4).


          I put index on filters.  I also made a new version of [Full List].  In there I set its value to ALL when the two LODs are equal.  All Regions are selected, so set the list value to ALL.  Otherwise just grab the [Full List] value.  Play with the filter and see how it looks.


          As you noticed in your original Calculation1, you need to run the table calc along [Region].  I had to do that to all the table calcs here too, including [index].