The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
I need to dynamically calculate the start and end dates for a number of projects. Each project has an area which can be used to calculate the duration of the project by dividing with a month/ha user input (say 10 ha/year). Each project also has two scores which can be weighted together with user inputted weights (say 2 and 3 for score 1 and 2) to achieve a project score, which is then calculated using a measure. These scores define the prioritization, where the project with the highest score is first in line. A sample of the table looks like the one below with defined measures included:
Project ID | Area | Duration (measure) | Score1 | Score2 | Project score (measure) | Prioritization (measure) |
ID_0 | 18 | 1,8 | 1 | 3 | 11 | 2 |
ID_1 | 55 | 5,5 | 2 | 2 | 10 | 3 |
ID_2 | 32 | 3,2 | 4 | 5 | 23 | 1 |
Based on this prioritization, I need to calculate the start and end dates for each project. Suppose I have 10 projects but only two projects can be ongoing at the same time. Thus, I need the first two projects to start at say 2024-01-01, and then - based on the duration - when the first of the projects end, the project with rank 3 can begin and so on.
I have calculated the first few steps, but now I'm stuck. I need to get the second lowest date in a new step. But I also wonder if there's a smarter way to do this. My initial code bit is pasted below (and in the sample file). The sample file of the problem can be found in this Power BI-file:
Any help or guidance is much appreciated!