2 Replies Latest reply on Aug 17, 2018 8:09 AM by Dan Huff

    Data blending error when using page function

    Steve Yau

      Hi all,

       

      I am using tableau page function to highlight different period in the time series. I duplicated the data in order to make to function works. I only use the ship date as the linking field but not the ship year used in page.

       

      It works fine originally. However, in the dashboard, I need to use state as filter. When I link the State field, the data in correct on when the ship year is exactly the same in two data sources. The numbers keep changing when page is in different ship year.

       

      The workbook is in the below link for your reference (please refer to Sheet 2).

      https://drive.google.com/file/d/1LDtLa36r0d5eMUQdwRusTRu7Lr-QtoQl/view?usp=sharing

       

      Thanks.

       

      Best regards,

      Steve

        • 1. Re: Data blending error when using page function
          Dan Huff

          Steve, a coworker forwarded this question to me. I will, at the least, upload a workbook explaining what is happening. I'm still digging into the "why" part and if there is a solution for what you need. I just wanted you to know that somebody is looking.

           

          I will make sure my workbook is in 10.5 so that you can open it.

          • 2. Re: Data blending error when using page function
            Dan Huff

            Steve Yau I have attached a workbook with an explanation and a potential workaround here.

             

            The Issue

            What you are hitting is an order of operations problem in Tableau. Though this page doesnt speak to this issue, this is a good resource to have linked--Tableau's Order of Operations

             

            When blending is in use, we have to join the results from the distinct queries together in order to build the resulting visualization. Once the State field is linked, the pages selection appears to be limiting the states that are available in the primary data source. This then effects the results we get after the blend as we only capture the sales totals for the states that had shipments in that year. See the dashboard in the workbook for a further explanation. Here is a quick example data set:

             

            YearStateSales
            1A1
            1B2
            2A2
            2B3
            3B1

             

            If we built a similar workbook with this mock data, let's talk through what we would see for each page assuming we link on both Year and State.

             

            Year 1 and Year 2 -- our totals would be correct as both A and B have sales in these years. We would see the grand total of Sales of 9 shown in our viz

            Year 3 -- Since only State B has Sales in Year 3, this means we will only consider this State for our Sales total. Our viz will now, instead, show a total of 6 since we don't include A

             

            A potential solution

            I solved this in what is a simple way for this scenario--I don't know if yours will be as easy or not. I created a Ship Year parameter which I allowed to be a range of 2014 to 2018 with a step size of 1. I made sure to right click the resulting parameter in the Data Pane and change the number formatting so that it matches what you had on the pages shelf--no comma separator, no decimals. Finally, I created a calculation that only returns Sales if the year of the sale matches that of the parameter. Now you will have to update this parameter but it should work just fine for this case.

             

            Let me know if you have any further questions.

             

            Dan

             

            P.S. I deleted the custom geocoding from the workbook to decrease the size.

            1 of 1 people found this helpful