Forum Discussion
Calculation of Order Qty based on Minimum Level
Hi ,
Based on the information, creating the index column.
Try using the following DAX formula to create new column to calculate the order status, daily balance, stock days.
Daily Balance desired =
VAR CurrentBalance = [Daily Balance (kg)]
VAR Usage = [Usage (kg)]
VAR StandardOrderQty = 3000
VAR NewBalance =
IF(
[Index] >= 14 && [Index] < 29, CurrentBalance + StandardOrderQty * 2,
IF([Index] >= 29, CurrentBalance + StandardOrderQty * 3, IF([Index] < 4, BLANK(), CurrentBalance + StandardOrderQty))
)
RETURN
NewBalanceStock Day desired = DIVIDE([Daily Balance desired], [Usage (kg)])
The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous , thanks for the help.
Using 14 & 29 as a constant value in the DAX Calculation isn't appropriate as this figure will change when days go by. The reason I put a "Yes" on 14/04/2025 & 29/04/2025 is due to Stock Days will be less than Standard Safety Stock Day(s) of 40 Days after the 1st top up of 3,000 qty. So this "Yes" indicator should be calculated using Measure instead of make it as a constant value.
Regards,
TanLC
- Anonymous1 year agoNot applicable
Hi ,
If stock days is less than 40 and set to Yes, then it should be set to Yes for #4 and beyond, but only when the expected stock days is less than 40, depending on your requirements. The expected stock days is again calculated based on the expected daily balance, and that “yes” can't be judged based on the calculated stock days. It may not be calculated.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.