2 Replies Latest reply on Oct 10, 2012 10:28 AM by John Munoz

    Displaying Quarter over Quarter change in a map

    John Munoz

      Hello folks,

       

      I've been struggling with this for a bit and figured it was time to reach out for help.

       

      I want to create a map showing the percentage change between the value for the current quarter compared to the previous quarter on sales (current quarter sales-last quarter sales/current quarter sales).

       

      The problem I'm having is that I also need to filter the view on Quarter and only show one quarter at a time. When I try to create a table calc to do the comparison (percent difference), I get back all null values. I think Tableau is unable to do the calculation because it can only see 1 quarter's worth of data through the filter. I know I could show multiple quarter's worth of data through multiple maps and make this work, but I don't want to do that, I only want to show one map.

       

      Any and all suggestions are welcome.

        • 1. Re: Displaying Quarter over Quarter change in a map
          Jonathan Drummey

          Hi John,

           

          See the attached. There were two issues, one was that the table calc was set to Compute Using Table (Across). That setting is completely dependent on the arrangement of pills in the view, so when you moved to the map the results would change. The Compute Using that is needed is Order Date.

           

          The second issue was with the filtering. The basic filters in Tableau are processed within the data source, so they limit how much data Tableau gets. For the calculation you want, we need a filter based on a table calculation, which can be as simple as LOOKUP(ATTR([field]),0). I used a variation of this for the filter. Filters based on table calcs are processed after the data is returned to Tableau, so the Q over Q calc can work.

           

          Note that not every state has data for every quarter, so the LOOKUP() doesn't always return a quarter, that's why there's an empty radio button on the Quarter of Order Date filter. That's also why some states (like Wyoming and South Dakota in 2012 Q4) don't show any coloration.

           

          Cheers,

           

          Jonathan

          • 2. Re: Displaying Quarter over Quarter change in a map
            John Munoz

            Jonathan,

             

            Thank you so much for your insights, and for an answer to my problem!

             

            The filter workaround worked just like you said and provided a great solution to this problem.

             

            One thing to note, the example you posted needed a little tweaking. I needed to change it from using the order date field to using the order date field that I created that represented the date in quarters. I've attached the tweaked version so that others might benefit from your clever workaround.

             

            Thanks for taking time out of your day to help me out. People like you help make Tableau great!