9 Replies Latest reply on Sep 17, 2014 5:34 PM by Natalie Giggy

    How do I filter graphs made from blended data sets?

    Natalie Giggy

      I used the Tableau excel add-in to reshape my survey data and used the re-shaped data to create two visualizations.  However, there was one visualization that I wanted to make that I needed to use the original data for. I blended the original data with the re-shaped data and made the third visualization in a new worksheet. Now I want to put the three all visualizations together in one dashboard and filter all of them by a variable which both data sets share, but it looks like I need to create the filter separately for each of the data sets and have it sitting on the dashboard twice.  Is there anyway to use just one filter to affect all three visualizations?

       

      Thanks so much for your advice!

        • 1. Re: How do I filter graphs made from blended data sets?
          Shawn Wallwork

          Natalie, does it need to be a single select or a multi-select filter?

          • 2. Re: How do I filter graphs made from blended data sets?
            Natalie Giggy

            Shawn: It would be a single select filter  :]

            • 3. Re: How do I filter graphs made from blended data sets?
              Shawn Wallwork

              In that case you can use a parameter/calculate field combination. You create a parameter with a list of all the things you want to filter on. Then you'll set up a CASE/WHEN/THEN statement in. Here's one I had lying around:

               

              CASE [Select y-axis:]

              WHEN 'Clicks' THEN SUM([Clicks])

              WHEN 'Impressions' THEN SUM([Impressions])

              WHEN 'Interactive Impressions' THEN SUM([Interactive Impressions])

              WHEN 'Rich Media Impressions' THEN SUM([Rich Media Impressions])

              WHEN 'Click Rate' THEN [Calc Click Rate]

              WHEN 'Media Cost' THEN SUM([Media Cost])

              WHEN 'CPM' THEN [Calc CPM]

              WHEN 'CPC' THEN [Calc CPC]

              WHEN 'Click-Thru Conversions' THEN SUM([Click-through Conversions])

              WHEN 'View-Thru Conversions' THEN SUM([View-through Conversions])

              WHEN 'Total Conversions' THEN SUM([Total Conversions])

              WHEN '% Clicks by Site' THEN [% Clicks by Site]

              WHEN '% Impressions by Site' THEN [% Impressions by Site]

              WHEN '% Spend by Site' THEN [% Spend by Site]

              WHEN 'Video Completion Rate' THEN [Video Completion Rate]

              WHEN 'Interaction Rate' THEN [Interaction Rate]

              END

               

              Then you'll put a copy of this on the filter shelf for all three of the different data connections. If the field names are are NOT exactly the same for all three sources, then modify the THEN part of the statement.

               

              --Shawn

              1 of 1 people found this helpful
              • 4. Re: How do I filter graphs made from blended data sets?
                Natalie Giggy

                Fantastic, Shawn. I will give it a try!  Thanks so much.

                • 5. Re: How do I filter graphs made from blended data sets?
                  Natalie Giggy

                  It's been a while since I originally asked this question. I didn't figure it out back then but found a way around the problem, but it has crept up on me again. I haven't used parameters before so Shawn Wallwork's answer above is difficult for me to implement. I'm hoping that Shawn or someone else can provide more guidance.

                   

                  The situation:

                  I've got two data sources. Both contain a Date dimension. I have created a bunch of visualizations, each of which only uses a single data source, and placed them all on a dashboard. Thus, the dashboard contains visualizations that use the two data sources. I'd like to place a filter on the dashboard to filter all the visualizations by Date. I'm not sure how to set-up my parameter or CASE/WHEN/THEN statement to make this work. Does the CASE/WHEN/THEN statement need to address every dimension included in the visualizations that are in the dashboard?

                   

                  Thank you!

                  • 6. Re: How do I filter graphs made from blended data sets?
                    Shawn Wallwork

                    Natalie, welcome back! The short answer is: Yes. But there are many other ways to get a viz to work the way you want it to. So it really is best to post a packaged workbook with a bit of sample data so we can best direct you in, well, the right direction.

                     

                    Cheers,

                     

                    --Shawn

                    • 7. Re: How do I filter graphs made from blended data sets?
                      Natalie Giggy

                      Hi Shawn,

                      Fortunately I got a spot in a Parameters breakout session and was also able to get an appointment with a Tableau doctor at TC14 to get this problem sorted. I saw that you were up on stage with the rest of the Zen Masters! How did you enjoy the conference? 

                       

                      I ended up making a month parameter and then using the following calculation, which I used as a filter on all of the workbooks in my dashboard:

                      IF [Month]='All'

                          THEN 1

                      ELSEIF DATETRUNC('month', DATEPARSE("MMMM yyy", [Month])) = DATETRUNC('month', [Date])

                          THEN 1

                      ELSE 0

                      END

                       

                      Thanks again! Cheers!

                      -Natalie

                      • 8. Re: How do I filter graphs made from blended data sets?
                        Shawn Wallwork

                        Natalie, glad you got it worked out. As to the conference? What's not to like! They sure can put on a show (and party). That Zens on stage part was the hardest part of the conference for me (but at least I didn't trip!) How was your conference? What was your favorite session?

                         

                        As to your calculation you can probable shorten it up a bit:

                         

                        IF [Month]='All'

                        OR DATETRUNC('month', DATEPARSE("MMMM yyy", [Month])) = DATETRUNC('month', [Date])

                        THEN 1

                        ELSE 0

                        END

                         

                        Doesn't really matter, just wanted you to be aware of OR, AND, NOT.

                         

                        Cheers,

                         

                        --Shawn

                        • 9. Re: How do I filter graphs made from blended data sets?
                          Natalie Giggy

                          Hi Shawn,

                          I had a great time too, and learned a lot. I liked many of the hands-on sessions, but especially the one on analyzing survey data in Tableau. Thanks for the help on the calculation!

                           

                          Cheers,

                          Natalie