Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Bro
I would like to create the ivnetory forecast base on the in and out record, how to create below report in PowerBI, please help and share the code to me, Thanks
From Now on until the end of FY25 ( 31-Mar 2025)
Jul | End of Jul | End of Aug | |||||
Currently Qty | In | Out | Balance Qty | In | Out | Balance Qty | |
Item A | 50 | 10 | 30 | 30 | 20 | 10 | 40 |
Item B | 10 | 30 | 20 | 20 | 60 | 10 | 70 |
Hi @Roger_EA ,
Can you provide some sample data? We can better understand the problem and help you.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Or show it as a screenshot or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.
Please also show your desired results so we can help you better.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Roger_EA -create two measure for in and outas per your requirement
TotalIn =
CALCULATE(
SUM(InventoryTransactions[Quantity]),
InventoryTransactions[TransactionType] = "In"
)
total out measure:
TotalOut =
CALCULATE(
SUM(InventoryTransactions[Quantity]),
InventoryTransactions[TransactionType] = "Out"
)
create a measure for balance forcast measure as below
BalanceQty =
VAR LastDate = MAX(Calendar[Date])
RETURN
SUMX(
VALUES(Items[Item]),
Items[CurrentQty] +
CALCULATE(
[TotalIn] - [TotalOut],
FILTER(
ALL(Calendar),
Calendar[Date] <= LastDate
)
)
)
Hope it helps to get the expected forcast.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
User | Count |
---|---|
84 | |
75 | |
69 | |
48 | |
39 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |