Hi! I am adding a column to a collection but it seems to be not working. My collection shows 12 rows, but when I view it, there is no data reflecting.
Here is the code:
UpdateContext({Team: LookUp(Teams, ID=gloTeamID)});
UpdateContext({Period: LookUp(SurveyPeriods, ID=gloPeriodID)});UpdateContext({rowscnt:CountRows(Filter(TeamResponse, TeamID=gloTeamID))});ClearCollect(TeamRes, Filter(TeamResponse, TeamID=gloTeamID));
ClearCollect(TeamResponse1,
AddColumns(TeamRes,
"Level", LookUp(Levels,ID=TeamRes[@LevelID], Level),
"Team", LookUp(Teams,ID=TeamRes[@TeamID], TeamName),
"Period", LookUp(SurveyPeriods,ID=TeamRes[@PeriodID], Name),
"Segment", LookUp(Segments, ID = LookUp(Teams,ID=TeamRes[@TeamID], SegmentID), SegmentName)
)
);
//Group by and sum column code
ClearCollect(
periodsColl,
DropColumns(
AddColumns(
GroupBy(TeamResponse1, "Period", "Team","TeamID","grouped"),
"Score",Round(Average(grouped,Score),1)
),
"grouped"
)
);
Attached is the columns tab