Forum Discussion

Oros's avatar
Oros
Icon for Post Prodigy rankPost Prodigy
2 years ago

FIFO based on earliest expiry date

Hello.

 

I have a Sales and Receiving tables.

 

In the example above, a total of 20 apples sold and a total of 40 apples received.

 

The 15 apples received have an expiry date of March 15, 2024.  Therefore, if 40 apples were already sold, the March 15, 2024 expiry date is no longer available.

 

Following FIFO, the remaining 20 apples (40 received -20 sold) have the available expiry dates of April 15, 2024 (15 apples) and May 15, 2024 (5 apples). 

 

How do I show a Product table in which ONLY the earliest AVAILABLE expiry date will show for the 20 remaning apples? 

 

Then, if another 15 apples are sold, the product table will remove the April 15, 2024 expiry date and will be replaced with May 15, 2024.

 

Thanks.

 

3 Replies

  • Power BI is a reporting tool, not an inventory management tool.  Use the appropriate specialized tool.

    • Oros's avatar
      Oros
      Icon for Post Prodigy rankPost Prodigy

      Hi lbendlin,

       

      Thank you for your reply. 

       

      My post above is neither meant to replace an inventory management tool, nor resolve an inventory issue.  It just simply a Power Bi (reporting) measure question based on last date in reference to quantity.  I could have used an example that is not related to sales, receipts or inventory.   Thanks anyway. 🙂

       

       

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        The problem with Power BI is that it has no memory and no concept of variables - both things that your premise requires.