简体   繁体   English

Tableau 工具中的聚合字段

[英]Aggregate field in Tableau tool

I would like to receive your help in order to create an aggregate field in the Tableau tool.我希望获得您的帮助,以便在 Tableau 工具中创建聚合字段。

I have a data source.我有一个数据源。 The data source contains a few records (tuples/lines), and each record contains some attributes.数据源包含一些记录(元组/行),每条记录都包含一些属性。 Ie a numeric value, a unique attribute (Key) and string.即一个数值、一个唯一的属性(键)和字符串。

For example, the first two rows share the same key (ID=A).例如,前两行共享相同的键 (ID=A)。 This entity contains 2 records, the numeric value for each record is different (1 and 5).该实体包含 2 条记录,每条记录的数值不同(1 和 5)。

I would like to create a new field.我想创建一个新领域。 This new field should contain the minimum numeric value for each unique ID (entry).此新字段应包含每个唯一 ID(条目)的最小数值。

In order to create this new field, I created a calculated field.为了创建这个新字段,我创建了一个计算字段。 The field's formula is- min(NumericField) .该字段的公式是- min(NumericField) The problem occurred when I was trying to use this calculated aggregated field aggregate in order to create chats.当我尝试使用此计算的聚合字段聚合来创建聊天时,出现了问题。 In this case, the aggregation is no longer performed on my key field.在这种情况下,不再对我的关键字段执行聚合。

For example, I would like to calculate the average for each category (The avg should be calculated for the aggregated new field)例如,我想计算每个类别的平均值(应该为聚合的新字段计算平均值)

Do you have any idea in order to resolve the mentioned problem?您有什么想法可以解决上述问题吗?

Thank you!谢谢! ☺️ ☺️

An example一个例子

Try using LOD as below:尝试使用 LOD,如下所示:

{fixed [id]: avg([newcalculatedfield])}

Let me know if you need more help.如果您需要更多帮助,请告诉我。 thanks!谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM