Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Re: Count occurence of each unique in a Rollup

664 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Manuel_Kuhs
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi,

Let's say I have a People table with Name A, Name B, Name C.

Another Table "Sports", which links Name A with Football, Name A with Football (again), Name A with Basketball, Name B with Basketball, Name B with Basketball, etc.

In the People table I want to create a (rollup?) field that returns e.g. for Name A: "Football (2), Basketball (1)" as a string.

Haven't been able to figure it out playing with COUNT, ARRAY, etc in Rollup field and searching this forum. Any ideas?

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

You cannot do this with only a single rollup field with the current Airtable features. 

If there are only a few possible sports, you could have a conditional rollup field for each sport, then combine the info for all the sports using another formula field. 

Alexey_Gusev
13 - Mars
13 - Mars

If you have defined list of sports, you can hardcode them in formula
IF(Find('SPORT', {Rollup}),
  'SPORT: '&(LEN({Rollup})-LEN(SUBSTITUTE({Rollup}, 'SPORT','')))/LEN('SPORT')
) & 
IF(Find....


repeating it X times with the name of sport instead of SPORT
{Rollup} is rollup field, with all linked sports.