I'm building a collection from a list of projects, trying to calculate the number of projects being sponsored by various areas of the business. This is being determined by who the Executive Sponsor is - a Person field from the master list of projects. In a separate list of contacts, I have the name of the Business Area they represent, and a "Resource" field (a Person field from a SP list).
Everything seems to be working well with one exception: in my collection, I want to include the name of the Business Area as a column. Problem is that no matter what I try, it doesn't appear to be performing the LookUp properly into the contacts list, the BusinessArea column always comes out blank. Here is my code:
With(
{
wCounts: AddColumns(
GroupBy(
AddColumns(
'AES Global Portfolio',
"ESGB",
'Executive Sponsor'.DisplayName
),
"ESGB",
"GroupedItems"
),
"AreaCount",
CountRows(GroupedItems)
)
},
ClearCollect(
colBusinessAreaCounts,
AddColumns(
Distinct(
'AES Global Portfolio',
'Executive Sponsor'
),
"SponsoredCounts",
LookUp(
wCounts,
ESGB = Result.DisplayName
).AreaCount,
"BusinessArea",
LookUp(
'Hot Add Controls',
Title = "Executive Sponsor" && Resource.DisplayName = Result.DisplayName,
Team
)
)
)
)That last LookUp into Hot Add Controls is the part that isn't working properly, it isn't returning the Team (Business Area)
Here is what my Collection looks like:
That Result record in the Collection is showing the distinct Executive Sponsor record and the counts are correct. Just need to get that Business Area working.

Report
All responses (
Answers (