Forum Discussion
Measure to Show Only Projects that Fit Budget when Ranked
Hi JTPorterfield,
Why do we stop at 119 then find the proper ones to make it less than 130? Why not 94? If this is what you want, I'm afraid it's too complicated. What if the 11 is 1, should we check the others till the total is bigger than 130?
Best Regards,
Dale
The objective is to perform the maximum number of ranked projects that will fit in a given budget. This type of problem is fairly common when dealing with large sets of projects and limited funds. Essentially, you have more projects than you have money for, and you're trying to figure out which projects will fit a given budget amount. First, you have to prioritize them based on whatever variable is important/relevant. Then, the desired functionality is that as you change the budget amount, the projects you should perform will update. Then, you can look at the long-term impacts of different budget amounts and ideally find the best budget amount for the given set of projects.
You stop at 119 first because those are the most important projects that will all fit. If the 11 was a one, then yes, you would continue to look for additional projects that are possible.
I think I've found a measure solution that works in the context of a table, though I'm having trouble getting it to work in other formats. It involves a few measures.
First, I use VAR to create a running total, and then if the running total is less than the budget value, This tells me initial projects that fit the budget.
Second, I identify additional projects that are smaller than the difference between the maximum running total and the annual budget.
Finally, I use a similar format to the initial running total, but filtered for only projects that initially fit the budget or those additional projects. This seems to work, but again, only in the context of a table, so I'm still working on trying to visualize it in a graph.
- v-jiascu-msft7 years ago
Microsoft Employee
Hi JTPorterfield,
Do you mean you can do it with a calculated column but not with a measure? Can you share it?
Best Regards,
Dale- JTPorterfield7 years ago
Advocate I
I posted the formulas I used to use calculated columns in message 9 of this post - https://community.powerbi.com/t5/Desktop/Issues-with-Query-Parameters-Needing-to-Refresh-Data-Source/td-p/526890
I've also found a measure solution, but it only works when used in a table, which is only part of what I'm looking for. I've attached your original PBIX with the measures added, and a few more rows of data.
*edit - well, I thought I attached it, but apparently I don't have access to do so.
- v-jiascu-msft7 years ago
Microsoft Employee
Hi JTPorterfield,
You can upload the file to a cloud drive like OneDrive, GoogleDrive then share the download link here. Please mask the sensitive parts first.
Best Regards,
Dale