aecgis字段计数
On my pivot table blog yesterday, I wrote an article about using counts in a calculated field. A helpful tip is buried in the 8-minute video that shows how to create the calculation, so I'm posting the tip separately here.
昨天在我的数据透视表博客上,我写了一篇有关在计算字段中使用计数的文章 。 8分钟的视频中隐藏了一个有用的提示,该视频演示了如何创建计算,因此我将在此处单独发布提示。
This tip can help prevent data entry problems, if you've set up a named Excel table for a client or co-workers to use, or even if you're the only one using the table. Excel will automatically enter the data for you!
如果您已经设置了一个供客户或同事使用的命名Excel表,或者即使您是唯一使用该表的人,则本技巧也可以帮助防止数据输入问题。 Excel会自动为您输入数据!
Excel表中的数据透视表 (Pivot Tables from Excel Tables)
Most of the named Excel tables that I create are also used as the source data for pivot tables. For example, a pivot table from an orders table can show a summary of sales per month or by product.
我创建的大多数命名Excel表也用作数据透视表的源数据。 例如,订单表中的数据透视表可以显示每月或按产品的销售摘要。
![counterfield03 counterfield03](https://i-blog.csdnimg.cn/blog_migrate/e4a452a1d50bf1e0f9e31216693a6202.png)
Sometimes I need a count in the pivot table too, and in the old days I added a field, such as Date or Invoice ID, that I knew would have an entry in every row of the table. The field was set to show a Count, instead of a Sum.
有时我也需要在数据透视表中进行计数,并且在过去,我添加了一个字段,例如Date或Invoice ID,我知道该字段会在表的每一行中都有一个条目。 该字段设置为显示计数,而不是总和。
![calculatedfieldcount01 calculatedfieldcount01](https://i-blog.csdnimg.cn/blog_migrate/49edfa4220cc691c123d8c93309271ce.png)
添加计数器字段 (Add a Counter Field)
Using a Date or Invoice ID field is okay for showing a count, but those counts can't be used in a Calculated Field – Excel will always use the SUM of a field. So, if you'll need to use a count of the records, it's best to add another field, specifically for counting.
可以使用“日期”或“发票ID”字段显示计数,但是这些计数不能在“计算字段”中使用-Excel将始终使用字段的SUM。 因此,如果您需要使用记录计数,则最好添加另一个字段,专门用于计数。
In this Orders table, I added a column named Orders, and it will have a 1 in each row. Then, those 1s can be summed in the pivot table, or used in a Calculated Field.
在此Orders表中,我添加了一个名为Orders的列,该行每行将有一个1。 然后,可以将这些1加到数据透视表中,或用于计算字段中。
But, instead of typing a 1 in each row (which I might forget to do), I use a simple formula: =1
但是,相反的每一行中键入一个1(这我可能会忘记做),我用一个简单的公式:= 1
Then, because the list is a named Excel Table, the formula fills down all the rows, and is automatically entered in new rows. You'll never have to remember to enter that key piece of data, and the counts will always be accurate. That saves time, and prevents errors from missing data.
然后,由于该列表是一个命名的Excel表,该公式将填充所有行,并自动在新行中输入。 您永远不必记住输入关键数据,并且计数将始终是准确的。 这样可以节省时间,并防止错误导致数据丢失。
![calculatedfieldcount04 calculatedfieldcount04](https://i-blog.csdnimg.cn/blog_migrate/271a4044c883c25fc43d5ee193e02ac4.png)
Do you use counter fields in your source data? If so, do you type the values, or use a formula, to take advantage of the Excel Table features?
您是否在源数据中使用计数器字段? 如果是这样,您是否键入值或使用公式来利用Excel Table功能?
视频:创建带计数的计算字段 (Video: Create Calculated Field With a Count)
If you have 8 minutes to spare, and the attention span for a long video, you can watch this, to see how to create a pivot table, add a new counter field to the source data, and create a calculated field using the counter field.
如果您有8分钟的空闲时间,并且有较长的视频关注时间,则可以观看此视频,以了解如何创建数据透视表,如何在源数据中添加新的计数器字段以及使用计数器字段创建计算所得的字段。
It also shows the problems with using a Date field, displayed as a COUNT, and trying to include that in a Calculated Field.
它还显示了使用日期字段(显示为COUNT)并尝试将其包含在计算字段中的问题。
Or watch on YouTube: Create Calculated Field With a Count
或在YouTube上观看: 创建带有计数的计算字段
翻译自: https://contexturesblog.com/archives/2015/01/08/add-a-counter-field-to-excel-table/
aecgis字段计数