Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
andresgl06
Frequent Visitor

Specific date measure

Hi everyone,

I need help with creating the next measure (i´ve tried multiple things but nothing has worked so far):
Pbi.PNG
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

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

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.

amitchandak
Super User
Super User

@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.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.