1 2 Previous Next 18 Replies Latest reply on Aug 5, 2013 7:16 AM by Jackie Klein

    Calculated field as Global Filter

    Jackie Klein

      I have a dashboard that has multiple sheets that each use the same calculated field as one of the filters.  However, it does not appear I can make this Global?  Is there any way to do this? 

        • 1. Re: Calculated field as Global Filter
          bha.jand

          Hi Jackie,

           

          Can you share which version of Tableau are you using?

           

          For Tableau 7, when you make a calculated field or any column as Global filter, this is considered for all sheets. However, in Tableau 8, it gives an option to which sheets you need to apply the filter.

           

          Additionally, for both versions, on the dashboard, you need to manually make it to appear. This can be done by selecting any of the worksheets, then select Analysis in the Menu bar, then select the quick filters, select the field required.

           

          Hope this helps.

          • 2. Re: Calculated field as Global Filter
            Jackie Klein

            Hi,

            I am using Tableau 7.  My calculated field is actually a table calc (has the little triangle in front of it).  I tried doing what you described - I can make the field appear on the dashboard as a filter, but there is no option to Make it Global.

            • 3. Re: Calculated field as Global Filter
              bha.jand

              Hi Jackie,

               

              Thank you for sharing your version #. This will help me.

               

              Can you look into the any one of the worksheet and make sure for the following:

              1) the field is in filters shelf.

              2) when you right click on the field in the filters shelf,

                   a) if you see an option "Make Local", then your filter is already a Global filter.

                   b) if you see an option "Make Global", then your filter is local for the worksheet, if you want to make as a global,            please select the "Make Global".

               

              Hope this helps.

              • 4. Re: Calculated field as Global Filter
                Jonathan Drummey

                Table calcs are measures whose values are dependent on the dimensions in the view. Because Tableau is not able to predict those values across different worksheets in which they appear ("load the domain" in Tableau-speak), Tableau does not make them available as global filters.

                 

                A workaround for this is to use a parameter and then have a calculated field for the filter that compares the parameter to the table calc.

                1 of 1 people found this helpful
                • 5. Re: Calculated field as Global Filter
                  Jackie Klein

                  Thanks all.  Jonathan - I'm having trouble envisioning your solution.  Would you be able to mock-up in a dummy file?  My calculated field has over 200 possible values (based on Team Member name), so does that mean I would have to list all of those out in the parameter? 

                  • 6. Re: Re: Calculated field as Global Filter
                    Jonathan Drummey

                    Yes, all the values would need to be in the parameter. You could build that by creating a worksheet that has all the values, copying the data, pasting it in as a new data source, then building the parameter from the pasted data. Then you can delete the pasted data source.

                     

                    Once you have that, then you can create a field that is [my table calc field] == [my param], and put that on the Filters Shelf to filter for True. I set this up in the attached.

                     

                    Jonathan

                    1 of 1 people found this helpful
                    • 7. Re: Calculated field as Global Filter
                      Jackie Klein

                      Crud.  I don't think that will work.  New Team Members show up as often as daily which would mean an added manual task to refresh the data/update the parameter? 

                      • 8. Re: Calculated field as Global Filter
                        Jonathan Drummey

                        Yes, that would be necessary. The #1 most-voted idea is for dynamic parameters to help solve this kind of issue: http://community.tableau.com/ideas/1178.

                         

                        I think of table calculations as a complicating factor in views that giveth (many new possible computations) and taketh away (various features such as sorting, filter actions, etc.). Though I help build a lot of table calculations for users here on the forums, I'm careful about using them in my work because of their limits, and to avoid those limits will go to some effort to push computations "down" into regular aggregates, row-level results, and even into custom queries in the data source. If Team Member is something that is changing daily, you might see what you can do to make that a row-level result that could be used as a Filter Action across worksheets.

                         

                        Jonathan

                        • 9. Re: Calculated field as Global Filter
                          Jackie Klein

                          Thanks.  The reason I am using a table calc is because I'm comparing the Team Member in a line graph to the average of the rest of their team (so the graph has two lines).  I now need to create separate sheets for Week, Month, and Quarter of these line graphs to allow the user to select which View they want to see.  I created a parameter to select the Sheet to view -Week, Month, or Quarter but do not have a way to filter by the Team Member table calc on the dashboard and make it global across all sheets.

                           

                          I wonder if dynamic parameters are being planned for in the future?

                          • 10. Re: Re: Calculated field as Global Filter
                            Jonathan Drummey

                            Hi Jackie,

                             

                            This is an example of the last paragraph about why we ask for packaged workbooks in http://community.tableau.com/docs/DOC-5065. Based on your description, it sounds like you're using something like LOOKUP(MIN([Team Member]),0) to filter for a specific team member. There are a couple of different ways around this problem:

                             

                            One would be to have one worksheet that uses a calculated field that returns a different date aggregation based on the parameter, and use that field on Columns instead of different date pills on three different worksheets. If you are using a discrete date then it's pretty easy to control the labels for the date axis.

                             

                            Another is to have build the individual to group comparison via a self-blend instead of using table calcs. You didn't specify what the aggregation was for the group, whether it's an aggregation at a higher level (like the AVG across all Team Members) or an aggregate of an aggregate (like the AVG across all Team Members of a SUM of each Team Member) - I'm guessing something like the latter is the case. This changes how the blend can be done, I set up both self-blend options in the attached.

                             

                            Cheers,

                             

                            Jonathan

                             

                            PS: I know that Tableau really does pay attention to the Ideas and the # of votes, but I don't have any information about when a given feature might be included in a release.

                             

                            [edited 20130724 with updated workbook to include table calc filter on the option 2 line chart and PS:]

                            • 11. Re: Calculated field as Global Filter
                              Jackie Klein

                              Thanks Jonathan.  I tried to recreate your "blend group vs individual reversed" in tableau 7 using the Superstore data and it isn't working for me.  Would you mind taking a look?

                              • 12. Re: Calculated field as Global Filter
                                Jonathan Drummey

                                Hi Jackie,

                                 

                                Next time please post a .twbx instead of a .twb, it saves time when opening the file and guarantees we are looking at the same data.

                                 

                                Unfortunately, the solution I posted only works for Tableau v8. It requires the ability to have a dimensional filter on the secondary, which is a new feature in v8. (In v7, when you put a dimension from the secondary on the Filters Shelf, even though the pill looks like a non-aggregated dimension, it's really the ATTR() aggregation and subject to those rules). I read back through the thread and I'd missed the bit where you commented you were on v7, I apologize for not noticing that.

                                 

                                Jonathan

                                • 13. Re: Re: Calculated field as Global Filter
                                  Jackie Klein

                                  Ok, so this is what I got working.  I need to just make a couple tweaks - if at all possible in Tableau 7.

                                   

                                  1.  On the Dashboard page, is there a way to hide the Customer Filters that are not applicable to the Sheet that is selected.  For example, if Week is selected, show the Week Customer Filter only and hide the Month and Quarter Customer Filters.

                                   

                                  2.  On the Dashboard page, is there a way to hide the Worksheet Titles For the sheets that are not selected?  I've gotten some other answers on other posts on this, but can't figure it out for this particular scenario.

                                   

                                  Thanks!
                                  Jackie

                                  • 14. Re: Re: Calculated field as Global Filter
                                    Jonathan Drummey

                                    1. Not that I know of. One suggestion would be to remove the filter titles and insert worksheets that return different headings based on the Select a Sheet parameter, e.g. "(inactive) Month Filter" and "Month Customer Filter".

                                     

                                    2. Worksheet titles don't go away when the worksheet data is filtered out. Since v7 doesn't support scoped filters (where a filter can apply to a set of worksheets but not others), I think your best bet might be to do this all in one worksheet, where the Date dimension on Columns is a calculated field that is set up to return different strings for each view.

                                     

                                    Jonathan


                                    1 2 Previous Next