4 Replies Latest reply on Oct 22, 2018 8:48 AM by nick liu

    Removing Duplicate Columns with table Calculation

    nick liu

      I have the following shipment data by [Shipment #], [Month], [Origin to Destination]:



      What I want is to list the CountD of [shipment #] by [Origin to Destination] and by [Month], and then I want to have 2 more columns for [Avg of Last 2 months], and [Avg of Last 3 months]:


      Here is what I have done so far in tableau (I also attached the tableau sample file):




      I used lookup function to generate the averages of last 2 months, which shows the accurate results for avg of last 2 months.


      However, other than showing the actual monthly Shipment Counts, I only want ONE COLUMN for [Average of last 2 months], and only ONE COLUMN for [Average of Last 3 months], so that the whole output would look exactly the same as the following (I drew on excel):



      Any one could help on getting rid of the "Duplicate Columns" for Avg of last 2 and 3 weeks ?

      Any help would be greatly appreciated !!


      Thx a lot !!