9 Replies Latest reply on Mar 31, 2016 7:19 PM by Bill Lyons

    Two Indepedent Quick Filters in One View?

    Tim Powers

      Hi Everyone,


      I'm trying to develop a view with 2 independent quick filters, with no luck so far.


      Essentially, my data set is a time series, comprised of numerous metrics per client. Each client has a particular 'Primary Sector' demographic attached to it as well, so that several clients can fall into the same 'Primary Sector' demographic. I'm trying to compare, over a given period of time, a certain metric for a specific client to that metric for the overall demographic.


      I can easily created a view with a parameter for the metric, then quick filters for the client and time period. But I'm having difficulty combining the view with the demographic view, since a quick filter for the client and a quick filter for the demographic will ultimately filter down to the client level only, while I'd prefer to have a side-by-side bar chart, depicting the client metric compared to the aggregated demographic metric for each time period.




      Thank you.


      (Something like this, with one bar representing the client metric, and the other bar representing the same metric, but averaged on the basis of the selected 'Primary Sector' demographic.)

        • 1. Re: Two Indepedent Quick Filters in One View?
          Bill Lyons

          This is the reason Level of Detail (LOD) calculations were invented. (Before LODs, we usually resorted to the "self-blend" technique, which still works.)


          With an LOD, you can "fix" the level of detail at which the calculation is performed, in your case the "demographic," so it will not be affected by dimension filters. You can search the Tableau site for Level of Detail expressions or Level of Detail calculations and find many examples and white papers. If that doesn't clear it up for you, please attach a sample packaged workbook (.twbx) and we can help you build an appropriate LOD calculation.

          • 2. Re: Two Indepedent Quick Filters in One View?
            Tim Powers

            Hi there Bill,


            Thanks for the reference; I've been learning and researching about LODs to try and do what I want to accomplish but I haven't been able to quite fix it the way I want. I wonder if you might have some insight.


            Attached is a sample book of what I'm trying to do - there are 2 worksheets, with the ultimate goal that I'd like them both on the same worksheet, yet either one is filtered differently (with, as far as I can tell, both conflicting with each other's views). The idea is to make it look like the picture posted above.


            As seen in the attached workbook, one view is filtered by firm, while the other is filtered by primary sector, with multiple firms comprising a single primary sector. I've done this with quick filters, and tried with LOD expressions, but am having difficulty still being able to use the quick filters with these.


            If you'd be able to make a sensible view from this, then I'd be highly appreciative.

            • 4. Re: Two Indepedent Quick Filters in One View?
              Bill Lyons

              Thank you. This is definitely not as easy as I originally thought. I'm working on it. Not sure how it will turn out.

              • 5. Re: Two Indepedent Quick Filters in One View?
                Bill Lyons

                In your example data, each company is associated with one and only one sector, though a sector can have more than one company. Is that always the case? In other words, are you always wanting to compare the selected company with the "benchmark" of the sector that it is in? Or, do you want to select the company and sector independently of each other?

                • 6. Re: Two Indepedent Quick Filters in One View?
                  Tim Powers

                  Hi there Bill,


                  Thanks for taking a stab at this; I certainly appreciate it.


                  1) It is the case that a company will have only 1 primary sector associated with it, though many companies may comprise that sector.


                  2) Ideally, a company can be compared to any sector. In reality, while a company may have been classified as having a certain primary sector, there may be some value in comparing the company to another primary sector, so selecting each independently is preferred. Of course, conventionally, it's likely the company will most often be compared to its own primary sector.


                  Furthermore, while I may not have included it in the sample book, there is also 'Secondary Sector', 'Services' and 'End Markets', which are all similar to Primary Sector, with the hope that I'd be able to apply the same principle. (Only 1 benchmark bar per year, but with the potential level of detail drilled further down by filtering through these 3 additional filters, as though my original request wasn't hard enough).


                  But, as I said, I'm certainly appreciative for whatever you are able to examine and find feasible. So again, thanks for taking a stab at it.

                  • 7. Re: Two Indepedent Quick Filters in One View?
                    Bill Lyons

                    I hope I am interpreting your posts correctly that you intend to compare the company the sector it is in. If so, I think either Sheet 3 or Sheet 4 may be the closest I can get to what you are looking for. Sheet 4 has the advantage of being able to include the reference lines, whereas Sheet 3 has the advantage of having side-by-side bars as you requested. Personally, I prefer Sheet 4.


                    Regardless, the key to this is the LOD calculated field [Sector Financial Ratio Benchmark]:

                    { FIXED [Primary Sector],[Year] : [Financial Ratio List, Benchmark] }


                    Is that what you are looking for?

                    • 8. Re: Two Indepedent Quick Filters in One View?
                      Tim Powers

                      Hi there Bill,


                      Thanks for helping me out with this. I'm guessing you probably didn't find a way to have 2 independent quick filters function on the same view. Certainly, this helps out tremendously, though I'm surprised it can't be done.


                      In studying up on LOD expressions, it seemed that FIXED aggregates prior to any quick filters, so that in defining a measure that way with EXCLUDE (for instance, FIXED [Primary Sector]: EXCLUDE [Firm]) it should work, but maybe not.


                      Ultimately, thanks again for helping out with this project of mine.

                      • 9. Re: Two Indepedent Quick Filters in One View?
                        Bill Lyons

                        I'm definitely not saying it can't be done. I didn't have have time to try it last night. Your suggestion might work. I suggest trying it and letting us know! You could become an expert on the subject!