Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All, I would like to ask help on getting the stock inventory forecast (running total) of the data below.
The requirement should be cumulative or running total for forecast of inventory having the data for Daily qty, arrival, reserved and sales order.
Current forecast measure=
Sum of Inventory - sum(Reserved) + sum(Arrival) - sum(Sales Order)
Current Tables:
Date table (created date table)
For Reserved (for production use)
For Arrival (stock to be arrived)
For Sales Order (Order items with date)
For Forecast it is just a measure where , Sum of Inventory + Arrival - Reserved - Sales Order
Thank you.
Expected chart is line chart, but currently I only got this broken line.
Tables:
Item list table | |||||
Item | Color | Qty | Inventory(today date only) | ||
A12 | Black | 34 | 6/5/2025 | ||
A12 | Blue | 25 | 6/5/2025 | ||
A13 | Black | 6 | 6/5/2025 | ||
Purchase Order(Arrival Table) | |||||
Item | Color | Qty | arrival Date | ||
A12 | Black | 100 | 7/25/2025 | ||
A12 | Blue | 10 | 6/20/2025 | ||
A13 | Black | 16 | 6/30/2025 | ||
Sales Order Table | |||||
Item | Color | Qty | Date | ||
A12 | Black | 3 | 6/11/2025 | ||
A12 | Blue | 47 | 6/22/2025 | ||
A13 | Black | 78 | 6/28/2025 | ||
Production (Reserved Table) | |||||
Item | Color | Qty | Date | ||
A12 | Black | 2 | 6/5/2025 | ||
A12 | Blue | 3 | 6/22/2025 | ||
A13 | Black | 6 | 6/28/2025 | ||
Calendar Table(Date Table) | |||||
Calendar = CALENDAR (DATE (2024, 1, 1), DATE (2026, 12, 31)) |
Hi @CampBI ,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards,
Chaithra E.
Hi @CampBI
Thank you for reaching out microsoft fabric community forum.
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hey @CampBI ,
To create a stock inventory forecast with a running total, you need to calculate a cumulative measure over dates using DAX.
Inventory (today) + Cumulative Arrival - Cumulative Reserved - Cumulative Sales Order
Your data includes:
Inventory table (snapshot as of today)
Arrival table (future stock delivery)
Reserved table (production)
Sales Order table (outgoing demand)
Calendar table
1. Prepare Relationships
Ensure these relationships are in place:
Use many-to-one, single direction. If your Inventory table is snapshot-based (only today's inventory), keep it disconnected or relate by item only.
2. Base Measures
Total Arrival = SUM('Arrival'[Qty]) Total Reserved = SUM('Reserved'[Qty]) Total SalesOrder = SUM('SalesOrder'[Qty]) Total Inventory = SUM('Inventory'[Qty]) -- Static today snapshot
3. Create Running Totals
Cumulative Arrival = CALCULATE( [Total Arrival], FILTER( ALLSELECTED('Calendar'[Date]), 'Calendar'[Date] <= MAX('Calendar'[Date]) ) ) Cumulative Reserved = CALCULATE( [Total Reserved], FILTER( ALLSELECTED('Calendar'[Date]), 'Calendar'[Date] <= MAX('Calendar'[Date]) ) ) Cumulative Sales Order = CALCULATE( [Total SalesOrder], FILTER( ALLSELECTED('Calendar'[Date]), 'Calendar'[Date] <= MAX('Calendar'[Date]) ) )
If you want to filter by item or color, use slicers and/or add CALCULATE modifiers.
4. Create Forecast Running Total Measure
Forecast Running Total = VAR InitialInventory = CALCULATE([Total Inventory], ALL('Calendar')) RETURN InitialInventory + [Cumulative Arrival] - [Cumulative Reserved] - [Cumulative Sales Order]
5. Visual Setup
Use a line chart in Power BI:
Optional:
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |