The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 Inventory | 100 | |
Scheduled Receipts (today) | 25 | |
Date | Sales Demand | Projected Available Balance |
02/01/2019 | 5 | 120 |
02/02/2019 | 10 | 110 |
02/03/2019 | 7 | 103 |
02/04/2019 | 20 | 83 |
02/05.2019 | 83 | 0 |
Solved! Go to Solution.
Hi,
You may download my PBI solution file from here.
Hope this helps.
Hi,
You may download my PBI solution file from here.
Hope this helps.
Incredible, thanks so much
You are welcome.
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.
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.
Hmmm. That's a tough one because to the best of my knowledge, EARLIER is not support for Direct Query:
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
94 | |
88 | |
71 | |
65 |
User | Count |
---|---|
241 | |
124 | |
120 | |
81 | |
79 |