Forum Discussion

Pogi_Shane's avatar
Pogi_Shane
New Member
1 year ago
Solved

Future Inventory based on Current Inventory, Forecasted Sales and Future POs

been struggling to come up with a measure that calculates the running balance of inventory. Below is a table with the Column 'What i expect" and what i am trying to solve for. it basically takes "sum...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, Pogi_Shane 

    Thanks for Kedar_Pande's reply. You can try this dax to achieve your need.

     

    Add all = 
    VAR _onHand =
        SELECTEDVALUE ( Netsuite_Inventory[On Hand] )
    VAR _remainingOpen =
        SELECTEDVALUE ( Netsuite_Inventory[Remaining Open] )
    VAR _units =
        SELECTEDVALUE ( Netsuite_Inventory[Sum of SUM of Total Units] )
    RETURN
        Netsuite_Inventory[On Hand] + Netsuite_Inventory[Remaining Open] - Netsuite_Inventory[Sum of SUM of Total Units]

     

    Cumulative value = 
    VAR _index =
        MAX ( Netsuite_Inventory[Index] )
    VAR _ACCUMULATED =
        CALCULATE (
            SUM ( Netsuite_Inventory[Add all] ),
            FILTER ( ALL ( Netsuite_Inventory ), Netsuite_Inventory[Index] <= _index )
        )
    RETURN
        _ACCUMULATED
    

     

    Best Regards,
    Yang

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know.
    Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum