4 Replies Latest reply on Aug 27, 2012 4:24 PM by Tom Walter

    Data blend on continuous date field

    Tom Walter

      Hi,

       

      We are attempting to do a data blend on a date field that is continuous in our primary datasource, and on which we have a filter.

       

      This doesn't appear to work, you get back ALL dates from the blended datasource, rather than just those that have been filtered to in the primary source.

       

      The problem resolves if we set the date to a discrete field, in that case, only the filtered dates from the secondary source are returned, however this of course means that the data in our view is split into individual dates when we want all dates to be aggregated.

       

      Is there a workaround for this?

       

      Cheers

      Tom

        • 1. Re: Data blend on continuous date field
          Robert Morton

          Hi Tom,

           

          That's an interesting problem, and I suspect it would help us to have you report the case to Tableau Support, especially if you can demonstrate the problem through a sample of your data, or an example that mimics the same problem.

           

          In the meantime, I'm curious if you can get the desired filter behavior by keeping your continuous field in the view but filtering using a discrete filter. Alternatively you could try creating a boolean calculated field which expresses your filter criteria, and place that boolean calculated field on the filter shelf.

           

          I hope this helps,

          Robert

          • 2. Re: Data blend on continuous date field
            Tom Walter

            Hi Robert,

             

            Here is an example workbook illustrating the issue. I want some way to have the SUM(Sales) field from the blended datasource match the sales in the primary datasource.

             

            Cheers

            Tom

            • 3. Re: Data blend on continuous date field
              Joe Mako

              Tom, to get the result you are looking for requires an understanding of how Tableau generates marks (more than I can detail in a comment). The key thing to be aware of in Tableau is the four main pill types:

              - discrete dimension

              - discrete aggregate

              - continuous dimension

              - continuous aggregate

               

              the dimension (non-aggregate) pills set your level of detail, each Axis Pane can have a different level of detail, wither by using Multiple Mark Types, and different dimension pills on each, or as you have here with a combination of continuous dimension and continuous aggregate pills making your separate Axis Panes.

               

              For your situation, what you have there is three Axis Panes, generated by the three continuous pills on your Columns shelf.

               

              You can more easily see the marks that Tableau is generating by changing the Mark type to Circle. In the first Axis Pane for the Date pill, you have 40 marks, one mark for each combination of Date and Market in the primary data source after filtering is applied. In the other two Panes, there is only four marks in each, one mark for each Market. These marks have no visibility of Date, because that pill is in another Axis Pane.

               

              This is where the mark count of 48 comes from 40 + 4 + 4.

               

              You can give the other panes visibility of the Date pill by placing it on the Level of Detail shelf. Once you do that will have 120 marks (40 + 40 + 40), each mark in each Axis Pane is defined by the combination of Market and Date.

               

              Another important awareness is that the filter shelf only impacts the primary data source, ways to filter the secondary include using parameters and calc fields in the secondary, or having the level of detail match your filtering.

               

              I suspect that you then want to sum all those Sales value marks into one mark, and that can be done a few ways.

               

              You can use table calcuations, that enable you to blend at one level, and aggregate at another.

               

              another option is using stacked bars and a ref line.

               

              See the attached for examples.

              • 4. Re: Data blend on continuous date field
                Tom Walter

                Thanks yet again Joe.

                 

                Sometimes I think that Tableau should pay you in more than just kudos! :-)