Loading

How to Create Bins for Calculated Fields

Дата публикации: Feb 27, 2025
Описание

The Bins (Create > Bins) option is unavailable for calculated (aggregated) fields because bins can only be created from discrete numeric fields (i.e., measure fields). However, calculated fields are typically treated as aggregated values or dimensions, which do not directly support binning.

 

 

Решение

Possible workarounds are as below.

Option 1: Use level of detail (LOD) calculations to create bins. For more information, see : Create Level of Detail Expressions in Tableau

For example, 

{FIXED Region:

IF  [field name] <1 THEN "bin 1"

ELSEIF [field name] >=1 THEN "bin 2"

END}

 

Option 2:  Create bins using an IF/THEN calculation. For more information, see Logical Functions > IF test1 THEN value1 ELSEIF test2 THEN value2 ELSE else END > Example

For example:

IF [field name] <1 THEN "bin 1"

ELSEIF  [field name] >=1 THEN"bin 2"

END

 

Option 3. Manually Create a binning calculation

For example,

INT([field name]/[Bin Size])*[Bin Size]

 

 

 

Дополнительные ресурсы
Номер статьи базы знаний

001473804

 
Загрузка
Salesforce Help | Article