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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

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.


@ 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!:
The Definitive Guide to Power Query (M)

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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors