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
Anonymous
Not applicable

Stock lenght calculation based on production date

Capture.PNG

 

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

Please provide more description about your requirement.

Why should we sum up 225,286,118,224,113,303,106 while filter out the rest values in second table even though they share the same [Article] "200388"? 

What is the basis to find out the date 11.09.2018?

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

The basis of finding Stock lenght in days is:

 

"Stock on hand" database amount value shows each article current stock amount

 

"Injection molding" database date column is sorted in a descending order. Each line displays production date with amount produced.

 

Formula for "Injection Moulding" Stock lenght in days should return days value (separated into two steps below)

   1. Formula to find "Injection Molding" date value for each "Stock on hand" article where cumulative SUM of "Injection Molding" article produced exceeds "Stock on hand" amount value.

   2. Formula to result days from current date to date found on step 1.

Anonymous
Not applicable

Any ideas how to put it into DAX ?

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.