2 Replies Latest reply on Jul 10, 2018 1:00 PM by Nicholas Zabilski

    How to calculate cumulitive sales on a weekly basis without using table calculations

    Nicholas Zabilski

      The goal of my report is to return the maximum amount of inventory that my company has had in stores at any given time throughout the year.

       

      My company uses week numbers instead of dates, so my data has a column for week and has values ranging from 1 - 21.

       

      I essentially want to get a running total of sales by week number and style. I don't think that I can use a table calculation since I want to add the running sales total by week to the corresponding week's store inventory. Since we transfer product out of stores often, I want to return the maximum amount of inventory we had out in stores up to that time (which for the purpose of this project is cumulative sales + store inventory+ DC On Hand)

       

      Below is a simple example of the math that I would like tableau to do. Current week is week 21, but as you can see for style #1 in the selected cell (going from week 15 to week 16) about 3,000 units were transferred out of the DC. I am reporting on how sales performed relative to total investment in the product, so I want to use week 15's total since it represents all of the units that we owned up until we removed units from the DC. The below is a recreation in excel, so my sales figures in the data I am using are non cumulative (what I am trying to recreate in tableau) and my "TTL" calculated field only has "store OH" and "DC OH" being summed up. Wherever Style#1 pops up I want to be able to return the number 12,613 for its "TTL"

       

      TTL Avail.PNG                                                 

       

      Hopefully this makes sense, I would really appreciate some input on this!

       

      Thank you!