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
erhang
Helper II
Helper II

Formula to Distribute Stocks

Hi there 

 

İ need your supports  pls .

İ hope you can help .Thanks in advance for your supports.

 

 

I have below two table . i have stocks and i want to distribute these  stocks based on some rules.

Capture24.JPG

 

 

Rules : 

 

1-Stock qty will be distributed based on "requsted delivery date". Earliest day will have the first priority.

2-İf the "requested delivery date"  are same day for each line ( as i marked red on above table) , system will check document number and the smallest "document number"  will have the first priority.

3-İf the "requested delivery dates" are different , system will never care document numbers.

 

after this calculation rule , i want as below table  : Capture25.JPG

 

 

i will be so grateful if you can help me dears .

 

Erhan 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @erhang

I test with your example and get this result.

3.png

Here is my pbix for your reference.

 

Best Regards

Maggie

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @erhang

I test with your example and get this result.

3.png

Here is my pbix for your reference.

 

Best Regards

Maggie

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.