This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
I want to show stock on hand qty at any point of time.
I have 2 tables
1.StockBal
2.StockTransaction
StockBal table stores SOH of the item and for a site at the end of every month. So for a item and a for site it will 1 entry per month. StockBal - has Feb data only.
Stock Transaction table stores, daily transactions for a item and site.
In order for me to calculated the SOH for Jan. I subtract StockBal Qty with transacted qty to showing historical data. for March I add Stockbal Qty with Transacted qty to get SOH.
StkUnitQty is daily transcated qty
Measure to calculated Culmulated StkUnitQty
Measure to calculated SOH in Stock Transacted table is
SOH=
e.g StockBal for item 14L is
and Stock Transaction for same is
When I add this measure then it adds the SOH qty,
Requried result should be
It should show the next SOH qty rather then same adding the next qty in the previous qty.
I am sharing the pbix file
https://drive.google.com/file/d/1Z4I3hQgNFCxaIIQJByjkz4S6uj5PmJn8/view?usp=sharing
Thanks.
SOH is a caclulated column, not a measure. it can be simplified:
SOH = If(StockTransaction[AccountingDate]<=StockTransaction[DateFTStockBalance],
StockTransaction[FTStockBalance]-StockTransaction[Cumulative StkUnitQty]
,StockTransaction[FTStockBalance]+StockTransaction[Cumulative StkUnitQty])
Same for Cumulative StkUnitQty - it's a calculated column, not a measure. And that's probably ok since these values are not influenced by user filters.
I have to admit I don't fully understand why you sometimes add and sometimes subtract. Your calculated columns can be simplified - have a look at the documentation for CALCULATE(), and also consider replacing EARLIER with variables.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 34 | |
| 25 | |
| 24 |