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
vissvess
Helper V
Helper V

Group or rank for allocation for optimal utilization

Hi,

 

My dataset is as follows

ID       Length

SDF    340

GEW  510

DFA    80

SRD   450

ADV  350

AND SO ON.....

 

and I have rack dimension length to be 1650.

 

I need a ranking or grouping mechanism for me to suggest the IDs to be places together in the rack of provided length, so that the resource is utilised in optimal manner.

 

For instance, if 1,2,3 & 4 are grouped, unutilised length is 270. But if 1,2,4 & 5 is ranked for same group, then the total is 1650 makes it completely utlized. So the ultimate aim is to bring the unutilised closed to zero.

 

Any workaround for this is hugely appreciated and I would be so thankful.

 

Thanks in advance.

 

1 REPLY 1
Stachu
Community Champion
Community Champion

if I understand the requirement correctly you need to solve a knapsack problem
https://en.wikipedia.org/wiki/Knapsack_problem

There should be plenty of scripts online for Python/R to solve it, it's also possible with Excel Solver. You could potentially use Python/R within PowerBI, so that may be a way forward.

Unfortunatelly I don't think DAX or M would be able to solve that kind of problem, they were written for different purposes.



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

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