2 Replies Latest reply on Oct 14, 2016 10:20 AM by jenny.cherkasky

    Compare periods for every single day

    jenny.cherkasky

      Hi everyone,

       

      I have two columns with dates A and B.

      Column A contains a trading date and B the delivery date for all available products. All dates are available in a daily granularity.

      I would like to calculate the monthly, quarterly, etc. averages (to be able to choose the dimension I want) for EVERY trading date. So I want to track down, how the monthly (or quarterly, etc. )  average price developed over time.

       

      Here one example of what I mean: I want to calculate for e.g. the 13/09/2016 the average prices for October 2016, if I chose 'Months' as granularity and October 2016 as the time frame. But I want also to calculate it for the 12/09/2016 and all the days before in my database.

       

      Also, I would like to compare the prices for two different periods with each other (Eg. Avg. price in December compared to average price for Q1 over time (Trading date)).

       

      If it wasn't in Tableau, I would have done several loops, but I don't know how to resolve it in Tableau.

       

      I would be very grateful if someone could help me.

      Thank you very much.

       

      My data looks like this

       

        • 1. Re: Compare periods for every single day
          Luciano Vasconcelos

          Hi Jenny.

          I'm not sure i understood your requirement but would be nice if you post data instead image.

           

          Well, i'll tell what i'm thinking:

           

          Firstly, you want to select a date and a type of period like Month, quarter, YTD based on date selection.

          Second, you want to have another date selection to compare info.

           

          This can be done using parameters.

          How about you post a xls file with data and with one sheet containing what you want as deliver.

          • 2. Re: Compare periods for every single day
            jenny.cherkasky

            Hi Luciano,

             

            I have attached a excel file with includes the data I have (Tab data) and output I am trying to achieve with Tableau.

            I know that I have to use Parameters, but I struggle to make it work dynamically... I choose December 2016 for example, and it calculates me the average prices for December 2016 for all trading dates..

             

            Thank you very much in advance!