Nicolas, that message is probably the most common error message. It's the one we all struggle with. But without knowing what data type is stored in each field there's very little help we can be, accept to say these are the aggregations you have to chose from:
ATTR() is the first place I usually start, but it all depends on data types. Post a packaged workbook with dummy data and we can help you work it out.