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
maheshsinha
New Member

Inventory Movement Analysis from Single Table

Hi All

 

I am new to Power BI and trying to learn and implement it in my company

 

The issue is i do have a table in SQL in which i do have records as below

Example Data

StoreCode | EntryType | Entry Code | Entry Date | Item Code | Qty

001 | PUR | 12331 | 01-APr-2017| 1001 | 100

001 | SAL | 12354 | 10-Apr-2017 | 1001 | -10

001 | Ret | 12454 | 15-Apr-2017 | 1001 | 1

 

So if we see 100 was purchased 10 sold and 1 got returned from customer that means closing is 91 where as if you see stock on 14-APr-2017 the closing will be 90.

Now problem is i can not use Entry Type and Measure of Closing at same time in a report where as to analyze the movement i need all these fields i.e Opening, Inward, Outward, CLosing

 

Please suggest how i can go ahead 

 

Regards

Mahesh

 

4 REPLIES 4
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @maheshsinha,

Have you resolved your issue? IF you have, please mark the helpful or right reply as answer. So other people will find the workaround clearly.

Best Regards,
Angelia

Yes thank you very much it is solved

Hi @maheshsinha

I an very glad your issue has been resolved. Please mark the helpful reply as answer, or welcome to share your own workarond, so that more people has the similar problems will find the solution clearly and easily.

Best Regards,
Angelia

fhill
Resident Rockstar
Resident Rockstar

Consider adding a Running Total Column as referenced in this link:

 

https://community.powerbi.com/t5/Desktop/Running-Total-DAX/td-p/41393

 

Here's my code based on your data:

Running Total COLUMN =
CALCULATE (
SUM ( 'sample'[ Qty] ),
ALLEXCEPT ( 'sample', 'sample'[ Item Code ] ),
'sample'[ Entry Date ] <= EARLIER ( 'sample'[ Entry Date ] )
)

 

You can then graph this runnign total to show Inventory over time...  (I would suggest a Store Level filter, as I didn't exclude StoreCode from the running totals.)

 

Capture.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.