My issue today is working with a set of data that has the following format.
| ProjectID | weekNumber | percentTime |
| 2024-REQ-001 | 28 | 10 |
| 2024-REQ-001 | 29 | 5 |
| 2024-REQ-001 | 30 | 2 |
| 2024-REQ-001 | 27 | 15 |
What I need to do is have a collection by ProjectID that has columns for weekNumber and the percentTime in that field. So it would look something like this. Yes, I realize I will be building a line for each of the weeks of the year unless there are other thoughts.
| ProjectID | week28 | week29 | week30 | week27 |
| 2024-REQ-001 | 10 | 5 | 2 | 15 |
This is the code I wrote and it is not the desired results
ClearCollect(
colTimeTracker,
ShowColumns(
AddColumns(
TimeTracker,
pTitle, Title,
week28, LookUp(pmoTimeTracker, Title = TimeTracker[@Title] And weekNumber = 28, percentTime),
week29, LookUp(pmoTimeTracker, Title = TimeTracker[@Title] And weekNumber = 29, percentTime),
),
pmoTitle, week28, week29
)
);
Maybe I am approaching this all wrong! Any help is appreciated.
Glen