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!View all the Fabric Data Days sessions on demand. View schedule
hi team,
need help for calculating inventory opening quantity and closing quantity
with out date beet ween date selection opening quantity and closing quantity correctly showing
if i select any beetween date its not show correct opening quantity and closing quantity
i select date from 02-04-2022 to 14-02-2024 the actual opening quantity 1000 and closing quantity 1000
but its show opening quantity 333 and closing quantity 333, how to calculate opening quantity closing quantity
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
In quantity: =
SUM( Data[In qty] )
Out quantity: =
SUM( Data[Out qty] )
WINDOW function (DAX) - DAX | Microsoft Learn
Opening quantity: =
CALCULATE (
[In quantity:] - [Out quantity:],
WINDOW (
1,
ABS,
-1,
REL,
ALL ( 'Calendar'[Date] ),
ORDERBY ( 'Calendar'[Date], ASC )
)
)
Closing quantity: =
[Opening quantity:] + [In quantity:] - [Out quantity:]
its not showing correct quantity
please share your sample pbix file, and then I can try to look into it.
thanks.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!