3 Replies Latest reply on Dec 6, 2012 11:43 AM by Tracy Rodgers

    yesterday sales versus daily average and max daily

    h b

      Hi,

      I'm trying to build a table that shows me yesterdays sales number and next to it daily average over the last 12 month, max daily value over the last 12month.

      I can sort of do this with WINDOW_AVG ( http://community.tableau.com/thread/121448 ), but that means i would need to drag 365 days into the view. I'm basically looking for 3 cells displaying this info.

       

      Thanks,

      Hannes

       

      PS: i also tried plying around with this ( http://community.tableau.com/thread/119005 ) solution but it does not seem to do the trick

        • 1. Re: yesterday sales versus daily average and max daily
          Shawn Wallwork

          Hannes you say:

          but that means i would need to drag 365 days into the view. I'm basically looking for 3 cells displaying this info.

          How is your data laid out? Are days running across the columns? So it 365+ columns wide? If so you might want/need to reshape your data. If it is in Excel you can use this handy Reshaper add-in Andy wrote awhile back.

           

          --Shawn

          • 2. Re: yesterday sales versus daily average and max daily
            h b

            Hi,

             

            my data is on an ibm Db2 and i import via odbc.

            1 sale corrsponds to 1 row. for each sale i have date of sale amount, etc

            trying to be more specific my tableau database has 500.000 rows and the following dimensions:

            -position nr

            -client

            -amount

            -date

            -office

            -salesperson

             

            with this data at hand i would like to create a view/table with basically three cells:

            nr sales yesterday, 12 month avergae daily sales, 12 month max daily sales

             

            thanks,

            hannes

             

             

             

             

            but that means i would need to drag 365 days into the view. I'm basically looking for 3 cells displaying this info.

             

             

            i was referring to to tableau. the only formula i know that sort of does what i need is window_avg, but for that formula to work i have to drag all days into the view (aka window).

            • 3. Re: yesterday sales versus daily average and max daily
              Tracy Rodgers

              Hi Hannes,

               

              One way to do this may be to place each of the three cells on separate worksheets and then place them on a dashboard together. The nr sales yesterday will need to be filtered down to show only the data from yesterday, but this can easily be done by placing the date field on the filter shelf. Then, for 12 month average and 12 month max daily sales, place year of the date field on the view, and then put the Sales measure on the view, each with the correct aggregate.

               

              Hope this helps!

               

              -Tracy