Forum Discussion
rajasekar_o
Helper V
2 years agoopening quantity closing quantity calculation
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 an...
Jihwan_Kim
Super User
2 years agoHi,
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:]
- rajasekar_o2 years ago
Helper V
its not showing correct quantity
- Jihwan_Kim2 years ago
Super User
please share your sample pbix file, and then I can try to look into it.
thanks.