1 Reply Latest reply on Nov 26, 2017 9:50 PM by Amit Narkar

    Inventory calculation

    Mike Chan

      I got a question and no idea how to make it happen in Tableau.

      I want to simulate the ending inventory for the next 6 quarters based on the forecast SI and ST UNITS..... The formulas is ending  CI (previous quarter)  + SI - ST for each quarter.Clipboard02.jpg

       

      can anyone give me some hint how to do it in Tableau?

        • 1. Re: Inventory calculation
          Amit Narkar

          I used below logic to get the numbers.

           

          Assumption:

          Ending CI for Any Quarter= Ending CI Previous Quarter + SI Current Quarter - ST Current Quarter

           

          Let me know if this is incorrect as CI Ending Numbers in your snapshot do not tie up with the logic.

           

           

          Logic Used: This would show Ending CI if available, when it is not available show it based on logic.

          ifnull(sum([Ending CI]),

          PREVIOUS_VALUE(sum([Ending CI]))+ sum([SI Units])-sum([ST Units]))