Set additive and aggregate values
You can allow aggregation on MEASURE columns and some ATTRIBUTE columns.
Aggregation is grouping many units or parts into a new value. In data, aggregation gathers multiple input values and calculates an summary value from them. You then use this aggregated value to do an analysis.
Every summary value results from a data aggregation function. An example aggregation function would be average or minimum. You can control how aggregation works in your data.
Making an ATTRIBUTE column ADDITIVE
Your data may contain a column with a numeric data type that you have defined as an
ATTRIBUTE rather than a
For example, you may have
ATTRIBUTE column with an
INTEGER data type that represents age.
Typically, these columns have an ADDITIVE setting of
Within a search result that contains data from this column, the options for each column on the left side of the screen includes UNIQUE COUNT OF and TOTAL COUNT OF.
To display extended aggregate view options, you must set ADDITIVE to
YES on these
This option is only possible on columns that have a numeric data type (
INTEGER) or a date data type (
After you make this change, ThoughtSpot offers these additional view options: TOTAL OF, AVG OF, STD DEVIATION OF, VARIANCE OF, TOTAL COUNT OF, UNIQUE COUNT OF, MIN OF, and MAX OF.
To change this setting, follow these steps:
Find the column whose ADDITIVE setting you want to change
Select the ADDITIVE toggle.
Change the value to one of these:
NO, if using the Web interface.
FALSE, if using the model file.
Save your changes.
MEASURE columns and
ATTRIBUTE columns support AGGREGATION operations.
To aggregate a column without having to enter the aggregation type explicitly in your searches every time, you can set a default Aggregation for that column.
Setting this default can make combining data more intuitive and faster.
ATTRIBUTE columns have AGGREGATION(UI)/AggregationType (model file) values with default aggregate type of NONE.
You can change AGGREGATION to one of the supported aggregation types.
To extend the available aggregation actions, set ADDITIVE on these columns to
Note the available aggregation options:
Does no aggregation. This is the default for
Adds the values together and returns the total. This is the default for
Calculates the average of all the values.
Calculates the minimum value.
Calculates the maximum value.
Calculates the standard deviation of all the values.
Calculates the variance of all the values.
Calculates the total number of values.
Calculates the total number of distinct values.
Keep in mind that not all numeric data should be aggregated. Consider a table containing data about athletes on a sports team. The data contains some numerical values, including points scored, salaries, and jersey numbers for each of the players. You should aggregate points scored and salaries, but it is not meaningful to aggregate jersey numbers. Because jersey number is an INTEGER, it would become a column of type
ATTRIBUTE), so it will aggregate, by default. You must manually change it to a column of type
ATTRIBUTE. This ensures that search results that include jersey number will not attempt to compare or aggregate those values in a way that is not meaningful.
To set the aggregation value, follow these steps:
Find the column whose default aggregation type you want to change
Select its Aggregation. If using the modeling file, use the AggregationType setting.
Select the new default aggregation type.
Save your changes.