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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Mattmcdowell_
Helper I
Helper I

Is powerBI the right tool for this?

I'm using powerBI to create a tool for our production team but I'm unsure if what I'm doing is best suited for PowerBI. What I want it to be able to do is take current on hand inventory and net out customer requirements by date and be able to calculate the date in which I run out of inventory.  It seems to be that PowerBI is very "column" based whereas what I want to do is calculate things by looking at the rows. In my example below I would want to know how to display February 5th as the day that I run out of inventory.  I know the methods to calculate what my on hand inventory is, and receipts but how to look at each distint row of sales demand with dates (and net out each date until I run out of stock) is where I'm stuck

 

On hand Inventory100 
Scheduled Receipts (today)25 
   
DateSales DemandProjected Available Balance
02/01/20195120
02/02/201910110
02/03/20197103
02/04/20192083
02/05.2019830
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my PBI solution file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

 

You may download my PBI solution file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Incredible, thanks so much

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

Something like this should work:

 

Column = 
VAR __invent = SUM(Table5[Value])
VAR __current = SUMX(FILTER(ALL('Table6'),[Date]<=EARLIER(Table6[Date])),[Sales Demand])
RETURN
__invent - __current

See Table5 and Table6 of attached.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Greg - that is exactly what I am looking for. Is there a way to use this using direct query mode (since I don't have access to the table mode)?

@Greg_Deckler I'm so close. The last step I'm missing is to have a column that adds up the quantites for each item number.  Line 25 I would want to see 72, then line 26 122, line 27 124.... etc etc.

 

tempsnip.png

Hmmm. That's a tough one because to the best of my knowledge, EARLIER is not support for Direct Query:

https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-d...

 

Let me introduce you to @ImkeF as she is an Power Query (M) genius and she might have a solution for you in M instead of DAX.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.