How “Group by” and “Stack by” work for multi-value fields (array fields)

How “Group by” and “Stack by” work for multi-value fields (array fields)

This article will explain how “Group by” and “Stack by” behave for multi-value fields, including multi-select custom fields (for example: Labels, Components, Fix Versions, Affects Versions. etc.)

When an issue has multiple values (e.g., one issue with 2 Labels), grouping and stacking behave differently:

  • Group by: The issue is counted once in each group - as in our example, one for ‘Refactoring’ and one for ‘Security’

  • Stack by: The stack combines the unique combination of labels for the issue into a single subcategory, “Refactoring & Security”, because the issue should only appear once on the y-axis. Otherwise, splitting the issue into two stacks would make it look like there are 2 issues instead of 1

The reason is to avoid double-counting issues in Stacks when multi-value fields are charted.

SD-2277-grouped.png
SD-2277-stacked.png

 

Group by:

“Group by” puts subcategories side by side for each x-axis item (category). It is suitable when you want to visually compare sub-categories belonging to the same category.

Stack by:

“Stack by” organizes unique sets of subcategories into separate stacks to keep the metric total correct, i.e. the x-axis (category) total bar height. It is suitable when you want to focus on the overall total and the part-to-whole composition of the category.