2 Replies Latest reply on Jun 19, 2018 2:03 AM by Mattias Elm

    Filtering a variable based on contents of other variable

    Mattias Elm

      This is a simple dataset containing 2 variables:

      1 - Supplier

      2 - Geographical area


      I have set up a simple bar graph showing the number of Suppliers in a Geographical area during last month (using COUNTD).


      I want to add a filter for a specific Supplier. The filter should be able to show ALL Geographical areas or ONLY the Geographical areas where this specific supplier is present.

      When the Supplier filter is chosen, I still want to show the same bar graph, but limited to the Georaphical areas where this particular Supplier is present.


      I am having trouble with constructing the filter, and don't really know where to start. If anyone could point me to what functions to use I'd me very grateful!

        • 1. Re: Filtering a variable based on contents of other variable

          Hello Mattias,


          Do you have the Geographical area filter in the view? If so, can you try to select the 'Only Relavent Values' option for Geographical area filter.



          If not, post the .TWBX file.



          • 2. Re: Filtering a variable based on contents of other variable
            Mattias Elm

            Hi Sudheer!


            Yes, the Georaphical area variable is in the view. The view simply counts the distinct number of Suppliers per Geographical area. What I want is to have a filter or a parameter that shows the full data, but only for the Geographical area where a particular Supplier is present.


            Each Geographical Area has many Suppliers, but the particular supplier (lets call it Supplier X) is not represented in all Geographical areas. The filter should have only two options; Show all Geographical Areas or Show only Geographical Areas where Supplier X is present. The view must still show the full data, not limited to counting only Supplier X, but showing the count for ALL Suppliers.


            Another possibility would be to split the view, so that one pane shows Geographical Areas where Supplier X is present and the other pane all other Geugraphical areas.


            I can't post the Workbook, since it contains sensitive data. I thought this would be simple enough without posting it, but if needed I will mockup some data and reconstruct the view from this dataset to be able to show what I mean.