Forum Discussion
DanielB_NL
2 years agoHelper I
Adding conditional column with either value from other column OR the value from the row above
Hi All, I'm still trying to find my way in PowerBi and to solve some interesting questions, which I have. I have this query that generates the upper table: it put some expected mutations for a ...
lbendlin
2 years agoSuper User
I'm a bit lost as to what you are trying to achieve. Are you trying to predict when you run out of stock?
Your sample data may not be sufficient for the scenario.
DanielB_NL
2 years agoHelper I
Yes I am. We have 4 types of mutations that influence the stock level:
- Purchase: receiving purchase orders
- Production: our own production from our shop factory
- Sales: sales via our Service Deparment
- Project: Usage on projects that are being assembled
My idea is
- That mutations are done in planned order, so I can put them ordered by date and see how stock fluctuates
- For mutations of type 3 and 4 there is a problem if after the mutation stock is below zero (of before the mutation, the mutation amount is bigger than the stock level)
- I want our Purchase Department to react and my first impression is that I can have up to 2 possibilities:
- If there is a purchase reception planned before the expected stock shortage: I can try to ask the supplier to increase the amount on that Purchase Order, but I need to now which Purchase Order I need to look at
- If there is a purchase reception planned after the expected stock shortage: I can try to ask the supplier to deliver earlier, but also for this goes that I need to know which Purchase Order to look at.
- Also for the Purchase reception that is planned after the expected stock shortage: if the difference in dates is less than or equal to 7 days, I can neglect them because for me that is still acceptable and not worth the effort to get the delivery a few days faster.
I hope you have an idea now of what I try to achieve