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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone,
I need help with creating the next measure (i´ve tried multiple things but nothing has worked so far):
In the image above there´s the table i already have created. Basically i have a In Quantity (Inqty) and a YTD In Quantity. The same goes for Out Quantity. Then i have "MvtoDia" wich is the InQty- OutQty. So, what i need to do is calculate the daily stock, wich it should be something like this:
Daily Stock on day 14= YTDMvtoDia (Evaluated "Today") - YTDMvtoDia(Evaluated day 15). In general form
DailyStock on day n= YTDMvtoDia(Evaluated "Today")- YTDMvtoDia(Evaluated day "n+1").
If anyone has any idea i´d be incredibly thankful
Hi @andresgl06 ,
Please refer to these:
https://radacad.com/calculating-stock-on-hand-using-dax-power-bi-inventory-model
https://www.sqlbi.com/articles/inventory-in-power-pivot-and-dax-snapshot-vs-dynamic-calculation/
If the problem persists,could you share the sample pbix via cloud service like onedrive for business?
Please remove any sensitive data before uploading.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@andresgl06 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format?
Appreciate your Kudos.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |