2 Replies Latest reply on Sep 3, 2018 6:35 AM by Noud van Heeswijk

    Adding a custom Reference Line

    Somya Ahuja

      Hi All,

      I am very new to the tableau and have been going crazy to figure out this. Here is what I am trying to do:

       

      I have monthly volume for different categories.(I am attaching sample data). I am adding a reference line for Average and Standard Deviation. However the average and standard deviation which is being calculated is based on the whole data. What I want is to add the reference line for average based on last 12 months and excluding current month.

       

      For example: For the below data, the reference line is showing average as 12.16(which is an average of all rows). What I want to show is average reference line as 5.3 which is an average of volume from Mar-17 to Feb-18. Similarly for standard deviation as well.

       

      Could someone please help me in figuring this out.

       

       

      DateProductVolume
      Mar-17Computer3
      Apr-17Computer4
      May-17Computer5
      Jun-17Computer6
      Jul-17Computer7
      Aug-17Computer8
      Sep-17Computer9
      Oct-17Computer3
      Nov-17Computer4
      Dec-17Computer5
      Jan-18Computer6
      Feb-18Computer4
      Mar-18Computer100