Forum Discussion

umapatil10's avatar
umapatil10
New Member
1 year ago
Solved

Calculating left over stock from previous month

I have Data something like below 

 25-May25-Jun25-Jul25-Aug25-Sep
Supply40    
Demad-10-11-12-15-20

I want to calculate Supply for next month, where it is Supply-Demad from previous month.

 25-May25-Jun25-Jul25-Aug25-Sep
Supply4030   
Demad-10-11-12-15

-20

 

Same way i need to calculate Supply for rest of the months. please provide DAX logic for this.

I need the final o/p like below

 25-May25-Jun25-Jul25-Aug25-Sep
Supply4030197-8
Demad-10-11-12-15-20

 

Greg_Deckler Ritaf1983 danextian Akash_Varuna 

4 Replies

  •  

    To calculate leftover stock from last month, you can create a measure that subtracts the total sales from the total stock for that period. Make sure your date filters are set correctly to isolate the previous month’s data. Using time intelligence functions in DAX can make this easier.

  • Hi umapatil10,
    I tried to implement the solution in the below attached pbix file. Please check it.
    Calculating left over stock from previous month.pbix

    Please let me know if you have further questions.

    If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

     

    Best Regards, 

    Maruthi 

    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X




  • v-menakakota's avatar
    v-menakakota
    Icon for Community Support rankCommunity Support

    Hi umapatil10  ,

    Thanks for reaching out to the Microsoft fabric community forum. 

     

    I would also take a moment to thank  maruthisp , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference. 
    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster. 

    Best Regards, 
    Menaka.
    Community Support Team  

     

    • v-menakakota's avatar
      v-menakakota
      Icon for Community Support rankCommunity Support

      Hi  umapatil10 ,

      I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution so that other community members can find it easily. 

       
      Thank you. 

      Best Regards, 
      Menaka.
      Community Support Team