4 Replies Latest reply on Dec 3, 2018 9:11 AM by Amar Amar

    How to display no data text based on filter list

    Amar Amar

      Hi,

      I've a use case to show 'No data text for un-selected value from the filter.

       

      Please see the attached workbook,

      For example, in the bar chart , when i select only Consumer and corporate , in the bar chart ,  i should show some text that says 'Home Office has no data' something like that.

       

      if i select only Consumer and Home office , it should show me the text that says ' Corporate has not data '

       

      for example: if i select only consumer, in the bar chart i should show text that says ' No data for corporate home office etc'

       

      Is this possible?

       

      Please advice.

        • 1. Re: How to display no data text based on filter list
          Chris Chalmers

          Hey Amar,

           

          Is it important that you be able to change which segments show data using the quick filter checkboxes? You can accomplish what you're looking for with a set, but it takes a couple extra clicks to modify which categories are included/excluded.

           

          Create a set on Segment.

          CreateSet.PNGSetProperties.PNG

           

          Create a calculation that returns [Sales] for segments in the set, and 0 for segments not in the set.

          SalesForSegmentsToShow.PNG

           

          Create a calculation that returns the string "No data" for segments not in the set.

          HiddenSegmentLabel.PNG

           

          With [Segment] on the Columns shelf, drag [Sales for Segments to Show] to the Rows shelf, and [Hidden Segment Label] to the Text shelf.

          Result.PNG

           

          To modify which segments are included or excluded, right click on the set and select "Edit", and use the dialog to update the contents of the set.

           

          Hope that helps! Also find the workbook attached.

           

          -Chris Chalmers

          • 2. Re: How to display no data text based on filter list
            Amar Amar

            Hi Chris. This helps but  changing the set manually will not help, I think we need to make the set dynamic correct?

             

            this is working for home office...but when the user selects let us say only consumer in the Segment Filter , it should display no data at Corporate and Home Office places. Similarly if the user changes the filters , the un-selected should show no data at the respective places dynamically.

             

            should we use something like filters and set together to make this work ? No idea.

             

            Please advice.

             

            Thank you

            • 3. Re: How to display no data text based on filter list
              Chris Chalmers

              Hey Amar,

               

              You are correct, this does not work with filters. The solution I suggested is instead of a filter, not in addition to a filter. To change which segments show "no data", you change the set membership by right clicking on the set and selecting "Edit Set...". There is currently no "Show Filter" equivalent for modifying sets from within the viz.

               

              Tableau 2018.3 has Set Actions, which would allow you to use a sheet on a dashboard for set member selection, but it looks like you're running Tableau 10.5.

               

              I'm not aware of any other way to get the exact behavior you want, but if you can elaborate on why you need the data to display like this, we may be able to suggest workarounds or alternative approaches.

               

              -Chris Chalmers

              1 of 1 people found this helpful
              • 4. Re: How to display no data text based on filter list
                Amar Amar

                Thanks  Chris for all the help. Yeah looks I can't with 10.5

                 

                I need this , suppose we have X and Y in a filter, when i select X it only selects data for X and I need to show No data in the Y place and  on the chart and vice versa. That is my use case.

                 

                Thx