Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello
This is the example for a day
I want to create a blucle for with variables of the same date, thickness, and width.
Take into account the maximum number of days and make a conditional difference in stock and outputs.
date - width - thickness
11/07/2022 - 4,95 -276 the maximum is 24
14 in stock and 6 outputs --> FIFO is met
11/07/2022 - 4,95 -276 days are 23
33 in stock and 3 outputs --> FIFO is not met (because the previous one is still in stock)
date - width - thickness
07/11/2022 - 11 -250 the maximum is 42
2 in stock and 2 outputs --> FIFO is fulfilled
07/11/2022 - 11 -250 the maximum becomes 34 (there are no more in stock of those days)
3 in stock and 3 outputs --> FIFO is fulfilled
07/11/2022 - 11 -250 the maximum becomes 27 ((there are no more in stock of those days)
4 in stock and 1 outputs --> FIFO is fulfilled
This is possible with power query or dax, I can't find a way to do it
Thank you
It is not well what I was trying to do but it has helped me to solve it.
Thank you
@Syndicate_Admin , Are you looking for FIFO
https://radacad.com/dax-inventory-or-stock-valuation-using-fifo
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!