@WebPortal
Yes, that name does not exist in the scope of your AddColumns. If you were to do another AddColumns outside of the AddColumns, then it would exist.
But the simpler answer is the following:
ClearCollect(
Tabs,
AddColumns(
GroupBy(Eventos,
"ID_Evento",
"Tab"
),
"DataIni", Text(Min(Tab,'Data de InÃcio'), "[$-en-US]dd/mm/yyyy"), // NOTE: Min is not reliable on Dates
"IDCurso", Max(Tab, ID_Curso),
"IDFormador", Max(Tab, ID_Formador),
"Valor", Sum(Tab, Valor),
"Local", First(Sort(Tab,'Local de realização',Ascending)).'Local de realização',
"Tipologia", First(Sort(Tab,Tipologia,Ascending)).Tipologia,
"Modalidade", First(Sort(Tab,Modalidade,Ascending)).Modalidade,
"Estado", First(Sort(Tab,'Estado',Ascending)).'Estado',
"TituloCurso", LookUp(Cursos, ID_Curso = Max(Tab, ID_Curso)).Designação
)
)