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

Recursive Logic for Logistics problem

Hi, I have a bit of a tricky problem at hand :-

 

We have to send out load in trucks but we want to try to send out full truckloads (1,2,3 etc) rather than half full trucks. We can delay a load for maximum of 1 day to achieve this. See example table below (How do I get the "Sent Load" column using Power Query/ DAX?). This problem does not seem to be solvable without using some kind of recursive formula, and I have not used that before, greatly appreciate a solution to this

 

DayTruckloads to be sentSent LoadLogic
Day 10.10Wait 1 day
Day 20.40.5Send Day 1 & Day 2
Day 30.80.8Waiting will create 1.2 truckloads, which is smaller utilization (0.2) so send 0.8
Day 40.40.4Waiting will create 1.3 truckloads, which is smaller utilization (0.3) so send 0.4
Day 50.90.9Waiting will create 1.1 truckloads, which is smaller utilization (0.1) so send 0.9
Day 60.20Wait
Day 70.81Send Day 6 & Day 7
3 REPLIES 3
Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

have you been able to solve the problem with the replies given?

If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

All the best

Jimmy

Jimmy801
Community Champion
Community Champion

Hello @Anonymous 

 

in this post is shown how such problems can be solved.

link 

as I understood this is not evaulation you are making, but a working process. So don't really understand what exactly is the starting point and what is the desired output

 

Hope this helps

 

Jimmy

dax
Community Support
Community Support

Hi Renegade1, 

I am not clear about your logic, if possible, could you please explain this to me?

539.PNG

day 1 is 0, day 2 is day1+day 2, day3 ~day5 , fixed data? Then repeate this logic? If not, please corret me and explain to me in details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors