Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors