4 Replies Latest reply on Aug 1, 2018 8:13 AM by Jim Dehner

    Sum is Incorrect

    Amy Newburn

      I'm trying to show the dollar value of real estate sales in five Florida Counties by month and year. The sum in my visualization is completely incorrect.

       

      What in the world am I doing wrong?

       

      Tablea 10.2.14

        • 1. Re: Sum is Incorrect
          Jim Dehner

          Hi Amy

          your data files have a couple of issues

          Your files don't contain an actual date - you have a year column in on file that is the january first data for the year (1/1/2011)and the other file contains a numeric year (2011)

          and the "month" field is a string -

          you are trying to join the 2 files on Month only - from a data perspective you want to join the files on the month/year - suggest you scrub the data (can be done in tableau prep) to get you date fields into actual dates and in a common format - then you will be able to match comparable data with an inner join

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          1 of 1 people found this helpful
          • 2. Re: Sum is Incorrect
            Amy Newburn

            @Jim,

             

            Thanks so much - I see how that can help me do what I need to. However, now I'm trying filter based on year and I can't seem to make that work. It messes up when I create it date as its own row (June 2017) but then also have a column with year (as a date) to filter.

            • 3. Re: Sum is Incorrect
              Amy Newburn

              I fixed it! Thanks Jim!

              • 4. Re: Sum is Incorrect
                Jim Dehner

                you will be able to filter  on year once your data is joined properly - right now joining on MONTH you are getting all years joned back in the data

                 

                if you get the data connected properly with  a real date as the join ( e.g. 02/01/2012) for Feb 2012 then you can use the date formula to group or select the data you want

                like Year(real date) will return the year of the real date that  is now part of each of your files

                 

                also you data really needs to be pivoted after the join    Pivot Data from Columns to Rows

                 

                Jim