Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
253 views
in Technique[技术] by (71.8m points)

Aggregate field in Tableau tool

I would like to receive your help in order to create an aggregate field in the Tableau tool.

I have a data source. The data source contains a few records (tuples/lines), and each record contains some attributes. I.e. a numeric value, a unique attribute (Key) and string.

For example, the first two rows share the same key (ID=A). This entity contains 2 records, the numeric value for each record is different (1 and 5).

I would like to create a new field. This new field should contain the minimum numeric value for each unique ID (entry).

In order to create this new field, I created a calculated field. The field’s formula is- 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

question from:https://stackoverflow.com/questions/65679970/aggregate-field-in-tableau-tool

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try using LOD as below:

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

Let me know if you need more help. thanks!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...