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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. 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
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.


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!:
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.


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

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.