5 Replies Latest reply on Feb 13, 2017 10:21 PM by Heather Rink

    Year totals as LODs

    Heather Rink

      Hello - I need to create a dashboard with the last 2 months, as well as the last 2 years of data together in one sheet.

      Previously when I filtered months to show the last 2 months, this affected my year totals (ie, the year total became the sum of the 2 months selected).

      I thought I had finally conquered this challenge when I created a fixed LOD calc for the year total. This works perfectly, but the one that I then created for the previous year somehow shows exactly the same figures as the year total.

       

      I've recreated the problem using the sample data - any help would be much appreciated.  PS - I'm still working off of Tableau 9.

      Many thanks!

        • 1. Re: Year totals as LODs
          Patrick A Van Der Hyde

          Hello Heather,

           

          Why does the requirement exist for both Year and current last two months exist to appear on the same page?  I can not think of a quick way to do this in a single visualization without filtering at the data level and making al data sources for each year and connecting them on Segment (see below picture).  The 2013 data source is filtered at the data source to only contain 2013 data and then 2014 has only 2014 data.  I have attached a copy of the workbook however it is in 10.1 as I do not have a local copy of 9.0 running.  You can run both 9.0 and 10.1 on the same license and on the same pc however if you wish to review.

           

          I have also created a dashboard view which is off a single data source and takes very little time to create.


          Patrick

           

           

           

           

           

           

          Using Dashboard:

          • 2. Re: Year totals as LODs
            Jonathan Drummey

            Hi Heather,

             

            1) What do you want the headers to be? Are you ok with this year/last year this month/last month or do you want them to be specific like November 2014, December 2014?

             

            2) Are you ok with using a small "scaffold" data source?

             

            Jonathan

            • 3. Re: Year totals as LODs
              Heather Rink

              Hi Jonathan

              I originally set up dynamic month calculations along the lines of IF[Date] = MAX[DATE] then [Data] ELSE 0 END, and then I named this 'latest month'.

              However the client didn't want to see a column titled 'latest month', they wanted the actual month name in the column. The only way I could achieve this was to filter the data for the last 2 months, then try a LOD for the year.

              Thank you for your help, I am still relatively new to Tableau and this forum is a really helpful feature.

              • 4. Re: Year totals as LODs
                Heather Rink

                Sorry also meant to add that I only started learning about data scaffolding yesterday, would it help here?

                • 5. Re: Year totals as LODs
                  Heather Rink

                  Hi Patrick

                  I will try to duplicate the data sources and filter them as you suggest. Originally I tried to overlay a year sheet on a month sheet in the dashboard, however there are a number of metrics per month and these could not fit into a single page together. I then found out that Tableau does not have a feature that synchronises scrolling across two worksheets on a dashboard.

                  I will try duplicating and filtering the data sources as you have, I wasn't aware that I could run both Tableau versions on the same license either, so that's really good news.

                  Thanks very much for your help.