This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I need help, I'm trying to implement a stock projection calculation in place.
What I'm looking to do is to say if I have enough stock to despatch a product. For that i'm looking at previous orders for the same product. If the due date of the despatch is the same the idea is to look at the earliest activationdate to determine an order.
I have a column showing the available stock for the particular product. This value should be decreasing in regards of the previous orders and not stay the same like it is right now.
I've attached a sample file as well as an excel spreadsheet with the calculation I'd like to achieve
Hi @ifenek ,
Trythe follwoing code:
Result =
SUM ( Example[availableforassembly] )
- IF (
SELECTEDVALUE ( Example[duedate] )
<= MAXX (
FILTER ( ALL ( Example ), Example[duedate] < MAX ( Example[duedate] ) ),
Example[duedate]
),
SUM ( Example[remaingquantity] ),
CALCULATE (
SUM ( Example[remaingquantity] ),
FILTER ( ALL ( Example ), Example[duedate] < MAX ( Example[duedate] ) )
)
)
Be aware that this may need some changes, because I'm not sure if I understood your requirements especially on getting the previous value.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 25 | |
| 21 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 20 | |
| 18 | |
| 18 |