我可以在 SharePoint 中创建 COUNTIF 计算列吗? [英] Can I create a COUNTIF calculated column in SharePoint?

查看:44
本文介绍了我可以在 SharePoint 中创建 COUNTIF 计算列吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法创建一个 SharePoint 计算列来返回列表中条目的数量?因此,如果我的列表中有 3 个客户,公司为Starbucks",我希望该字段返回3"

解决方案

(根据来自

Is there a way to create a SharePoint calculated column that returns a count of the number of entries in a list? So If I have 3 customers in my list with the company "Starbucks" I'd like the field to return "3"

解决方案

(Edited some wording for clarity per suggestion from dariom).

You may be able to get what you want with another list using a not-so-well-known variation of a lookup column.

Let's say you have a list called Companies with values in the title column like "Starbucks", "Peets", etc. Now you also have the Customers list you refer to, but the "Company" column is a lookup column pointing to the title column in the Companies list.

You can add a count very similar to what you described to your Companies list. Go to your Companies list, add a column of type "Lookup" referring to the Customers list and you'll notice that in the drop-down area where you define the lookup if you point back to the Customers list, you'll have a new option called "Count Related". This is here automatically because it recognizes that the Customers list has a lookup pointing back to this one. Select that Count Related option and now your Companies list will have a column counting how many customers are associated with that company.

No coding, Javascript hacks, or anything. Just hidden SharePoint auto-magic.

这篇关于我可以在 SharePoint 中创建 COUNTIF 计算列吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆