3 Replies Latest reply on Jan 3, 2017 1:05 PM by Aaron Lipke

    9.3 Resetting running total table calc when sum reaches certain point / carrying over remainder in running total

    Aaron Lipke

      Good afternoon,

       

      I'm in the process of building a terminal inventory / capacity dashboard for a client.  The view I'm currently stuck on is a pipeline that tracks how many onsite trucks are loaded to capacity and leave a facility.  I've created a simple anonymous data set to use as example.

       

      I have a "Load Date" date field and a quantity that is being loaded into trucks each day.  Each truck can carry 150,000 lbs of qty.  So for every 150,000 lbs, I need to represent a truck leaving.

       

      I've attempted this so far by using a running total of qty day over day.  I created a calculated field that divides the current running total by 150000 (total / 150000). 

       

      Currently the view looks like this:

      Desired output would look something like:

       

      So for every day, we would calculate how many trucks were filled to capacity, and then the remainder of qty would roll over to the next day + any new qty loaded and so forth.  I'm new to table calculations and am between a beginner and intermediate level Tableau user so any sort of learning I can do with this exercise will be greatly appreciated. 

       

      Please let me know if I can provide further detail to assist with a solution.