KNOWLEDGE BASE

How to Create Aliases for Aggregated Measure Fields That are Added to the View


Published: 15 Sep 2022
Last Modified Date: 16 Sep 2022

Question

How to create aliases for aggregated measure fields that are added to the view?
For example, when we added the SUM(Sales) to the [Size] mark, how to make aliases like "10,000" to "first group"?
User-added image
 

Environment

  • Tableau Desktop

Answer

Followings are possible workarounds to make aliases for measures.

Option 1
After using FIXED to calculate the aggregated value, change the field to "Dimension". 
The legend can be changed by right-clicking on the dimension field and using the "Aliases" function.
Calculation:
User-added image
Aliases:
User-added image

Option 2
Manually set the labels for the aggregated value with an IF statement.
Please refer to the sample calculation below:
IF { FIXED [State]:SUM([Sales])}<10000 THEN "Group 1"
ELSEIF { FIXED [State]:SUM([Sales])}<15000 THEN "Group 2"
ELSEIF { FIXED [State]:SUM([Sales])}<20000 THEN "Group 3"
ELSEIF { FIXED [State]:SUM([Sales])}<25000 THEN "Group 4"
ELSEIF { FIXED [State]:SUM([Sales])}<30000 THEN "Group 5"
ELSE "Group 6"
END
User-added image



 
Did this article resolve the issue?