KNOWLEDGE BASE

Filter a tree map by Grouped or Ungrouped categories


Published: 25 Mar 2021
Last Modified Date: 25 Mar 2021

Question

How to filter a tree map by Grouped or Ungrouped categories. Example: Group/ ungroup category and values based on parameter selection.
 

Environment

  • Tableau Desktop

Answer

1. In order to have a grouped view, create a group like below combining G2 and g2+ under g2
User-added image
2. Create a calculation group/ungroup similar to following:
IF [Grouping]="Ungrouped" then [Category] else [Category (group)] end

where [Grouping] is a string parameter

3. Use the above calculation group/ungroup on color and the measure on Size

Result:

Grouped:
User-added image

Ungrouped:

User-added image



 
Did this article resolve the issue?