1 Reply Latest reply on Apr 18, 2012 3:42 PM by clementlee

    Single date control for two sheets from two different data connection

      I have a dashboard showing two sheets, each of its has its own data connection A and B.

       

      I want both sheets showing data from the same date.  But a "global" quick filter applies only to its own data connection.  So if I add a quick filter on date for A, I still need another quick filter on date for B.  In the dashboard, there will be TWO quick filters.  This will look very odd to end users because they would wonder why they have to supply the same date information twice.

       

      I know of a workaround by creating a parameter (called "Selected a date"), and then create two boolean calculated fields called isSelectedDateForA and isSelectedDateForB -- the compare the respective date field in A and B with the parameter and return a true/false value.  And then I add these calculated fields to the sheet as context filter.

       

      This method would work, but the query are very slow.  I think that is because the queries have to pull in all rows from the tables (behind the data connections A and B) and then compute the calculated field.  When the tables have millions of rows this method is not very efficient.

       

      Are there any other better solutions?

       

      Clement

        • 1. Re: Single date control for two sheets from two different data connection

          Okay after some juggling I found another workaround.

           

          First I made sure date is on the view that use data connection A.  (Note that 'date' must appear as a dimension not an ATTR()).  This data dimension also has a quick filter (so that end user on a Tableau Server can control it)

           

          And then in the dashboard that contains both view, I added a filter action, which say when a certain row in A is selected, filter on B with 'date' as one of the filter.  Note that I also set the action to the setting of "Clearing the selection will exclude all values" so that the view of B would not have many days of data as the initial state (or when no rows in A has been clicked on)

           

          In this workaround, the user still needs two clicks.  Once on the quick filter of date of A, and then click on a certain row of A to trigger B (the view as well as the data connection behind it) to load the other data of the same date.

           

          Another funny thing with this workaround is that originally  my intention was that the view of A was a bar chart (two dimensions on row, and a measure (aggregate) in the column with marks as bar) , .  But now that I must have date as a dimension on this view, somehow I could not get a bar chart anymore.  I could only make it a table (the same two dimensions on a row, the mark is text showing aggregate of a measure, and then the column is the date dimension).  In other words, I could not get a bar chart with one single column as the date dimension.

           

          But at least the queries seem to be faster now.