6 Replies Latest reply on Sep 3, 2018 2:10 AM by Rafał Świeży

    Average sales based on running total of sales and day of the month

    Rafał Świeży

      Dears, this is my first post, I am new user of tableau, in case I am writing in wrong place or something let me know.

       

      I have a sales data rows like below:

       

      DateSales Ammount
      1.08.20181
      1.08.20182
      2.08.20182
      2.08.20183
      3.08.20185
      3.08.20181
      3.08.20181

       

      I want to have output table like below:

       

      DateRunning SUM
      Average Daily Sales
      1.08.20183=[Running Sum] / Day[Date]
      2.08.20187=[Running Sum] / Day[Date]
      3.08.201814=[Running Sum] / Day[Date]

       

      As you know I cannot create this kind of calculation because "I cannot mix Aggregate and non-aggregate arguments with this function".

       

      Generally I have data for each day since 2012 JANUARY for differnet departments, so at the and I want to comapre different years for different departments. Just to say that data is more complex then my example but i believe my example is enough for you people to help me

      I want to have a 1 month view.

      Waiting your help thx!