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
OKgo
Advocate II
Advocate II

DAX to compare inventory & demand & allocate existing inventory / lots

Hi all

Looking for some feedback on how to tackle this problem in DAX. Many thanks

https://www.dropbox.com/s/jtasi1b8cu6mdi6/PBI%20Forum.xlsx?dl=0

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

Your question is just not at all clear.  Please offer a business explanation, explain your datasets and show the expected result.  I even tried to read your Comments but still could not understand.


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

@Ashish_Mathur the business case is to use DAX to calcualte the next shipment to a location with repsect to the inventory they have on hand, the expiries and the demand. There are two tables to consider.

 

Row 13 shows lot 1 "can meet the demand" based on expiry for September and enough inventory to meet the meand. Lot 1 is depleted in October. There is still a demand of 1 unit remaining. 

 

Row 14 shows lot 2 has sufficent "can meet the demand" for October and enough inventory to meet the demand. Lot 2 is depleted in November.

 

Row 15 shows the cumulative demand that is not fufilled by the inventory 

Hi,

 

Thank you for the explanation.  I have read your posts quite many times but am just unable to understand your requirement.


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

Any more information? I clicked the link and it shows me like a 1 row of an Excel. Not really too keen on downloading and opening Excel files from random people. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ 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_Deckler, thanks for the honest feedback. Good point on the relationships in your post. I don't see a relationship possibility between Inventory & Demand. Maybe this is one my fundemantal problems - or why I need a third fictional / running total table per lot number?

Capture.JPG

 

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.