简体   繁体   中英

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. Ie 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

Try using LOD as below:

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

Let me know if you need more help. thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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