Published: 25 Jul 2018 Last Modified Date: 20 Sep 2023
Question
How to add one label for a group of overlapping or stacked marks.
For example, labeling points on a map with the same zip code with a list of all customer names. Or labeling points on a scatter plot with the same measure values with the total number of points in the stack.
In this scenario, each point is defined as a [Customer Name], but many customers are in each [Sales (bin)] and [Profit (bin)]. This means that the marks for these customers will overlap on the scatter plot.
Select Analysis > Create Calculated Field.
In the Calculated Field dialog box that opens, do the following, and then click OK:
Name the calculated field. In this example, the calculated field is named "Total Customers per Sales and Profit Bin"
In the formula field, create a calculation similar to the following: { FIXED [Sales (bin)], [Profit (bin)] : SUM([Number of Records]) }
Note: The fields [Sales (bin)] and [Profit (bin)] should be replaced with the measures used to define the coordinates of each point on the scatter plot. The field [Number of Records] can be replaced with any measure to return a total of that measure.
Drag [Total Customers per Sales and Profit Bin] to Label on the Marks card.
(Optional) Click on Label on the Marks card, and in the dropdown do the following: