3 Replies Latest reply on Aug 17, 2018 2:02 PM by Don Wise

    Join After Aggregation?

    Stephen Johnson

      Hi I'm new to Tableau and I'm not sure how to combine this sort of data:


      I have one table in my data source that has transactional sales data (each row has a date and sales amount). I have a separate table that has a sales goal for each month. How can I aggregate the transactional data at the month level and then compare the total sales each month with the sales goal for that month?

        • 1. Re: Join After Aggregation?
          Alex Braun

          If you join on every record on the month and year, then for your goal, you would need to do an LOD calculation to set the goal value for the month


          {fixed [month],[year]: avg(goal)} and that will solidify your monthly goal, then just compare the sum([sales]) to the sum([Goal LOD]) and Tableau will know what to do with it.

          • 2. Re: Join After Aggregation?
            Michael Ye



            You need to blend data, not join.


            The difference is: Join is row level based, while Blending is aggregate first then blend the two date source (Blending is actually a left join to primary table).


            So here, transactional data (daily based) will be aggregated first, then compare with sales goal table(monthly based) based on ID.


            There are many videos on Youtube discussing join and blending in Tableau.


            Hope it helps.


            Michael Ye

            6 of 6 people found this helpful
            • 3. Re: Join After Aggregation?
              Don Wise

              Hi Stephen,

              There are many roads to getting to same results.  I did a join using calculation on both sides as a LEFT JOIN.  Please see attached and below.  Hopefully this points you in the right direction!  Thx, Don

              Screen Shot 2018-08-17 at 1.57.08 PM.png

              Then set the Monthly Sales Goal as ATTR (Attribute) for comparison:

              Screen Shot 2018-08-17 at 1.58.20 PM.png

              3 of 3 people found this helpful