I'm trying to achieve something simple, but I can't get my head around it. I have a table with many rows and in one particular column, rows have the same value. I would need an additional column to give me the number of occurrences for each row value. Example:
id | name | city | additionalColumn
1 | Chris | London | 6
2 | Jane | London | 6
...
64 | Jerry | Glasgow | 3
Basically, in that table, I have 6 names with London as the city. I want each row where city = London to have the number of occurrences in the additionalColumn.
How do I go about this? I tried this, but it gives me the total number of rows instead, which defeats the purpose. I can't seem to reference the current row, for some reason, just the entire column.
additionalColumn = COUNTROWS(FILTER(table, FIND(table[city], table[city],,0)>0))
The result of this is:
id | name | city | additionalColumn
1 | Chris | London | 64
2 | Jane | London | 64
...
64 | Jerry | Glasgow | 64
Any ideas?
Thank you