Sharepoint list countif help needed

Copper Contributor

I have a sharepoint list thats a list off colleagues.  One of the columns contains the name of the line manager.  Those line managers also have their own rows in the list.  On their row I want one cell to show how many people report to them, ie I want a count of how many times their name appears in the Line Manager column.  Is there an easy way to achieve this?  In excel I would use countif to count how many times their name appears.  Thanks.

1 Reply

Hi @JohnESummers,

there is no "countif" equivalent in SharePoint's calculated columns. That is because calculated columns are only updated when the item itself updates, so they cannot include calculations from other columns.

What you could do is create a new page and add two list-webparts to it. Configure them to both show your list. Then open the property pane of one webpart and activate "dynamic filtering". Define it so that that webpart is filtered by the linemanager column and that the filter comes from the name column the other webpart.

If you now select a person in the first list, the second list will filter to just the people that belong to the line manager. You can create a different view for that list, that only contains the name and linemanager column.

Best Regards,
Sven