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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All
I need help to figure out this calculation forecast inventory. I have an issue with the DAX calculation
this calculation in Excel
Thank you in advance
Hi @ryanrizz
It seems like you're trying to create a forecast that takes into account the rolling average of the last 14 days to project future inventory levels.
The circular dependency error you're encountering typically occurs when a calculation refers back to itself directly or indirectly, creating a loop that Power BI cannot resolve.
The following ways may solve your problem:
First, ensure you have a measure that accurately calculates the rolling average of the last 14 days.
To calculate the ending stock for each day, you can create a measure that takes the previous day's ending stock and adjusts it based on the orders and the rolling average usage. However, to avoid circular dependency, ensure that each calculation is based on previously calculated or static values.
ENDING STOCK =
CALCULATE(
SUM('Table'[ON HAND FORECAST]) + SUM('Table'[ORDER QTY]) - SUM('Table'[USAGE FORECAST]),
FILTER(
ALL('Table'),
'Table'[DATE] = MAX('Table'[DATE])
)
)
Here is the result.
If you still have problems, it is best to provide the pbix file and be careful to delete sensitive data.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I apologize it is not working, let me elaborate again on the table
I need help to make the forecast in and out stock or inventory based on order qty and Usage,
I need projection inventory for 26-Feb onward for my PBI
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
11 | |
10 | |
10 |