CDP Data Visualization, enables you to create Grouped Bar visuals. While bar charts show comparisons among categories, grouped bar charts show clustered groups of related measurements as bars.
The following steps demonstrate how to create a Grouped Bars visual representation of ethnic distribution of population in some US counties. The example is based on the US Counties dataset . For more information, see Adding data and Creating a dataset.
For an overview of shelves that specify this visual, see Shelves for grouped bars.
Start a new visual based on dataset US Counties.
For instructions, see Creating a visual.
In the VISUALS menu, find and click Grouped
The shelves of the visual changed.
The mandatory shelves are X Axis and Y Axis. The fields placed on these two shelves may be easily swapped by switching X and Y. Doing this produces a horizontal chart.
Populate the shelves from the available fields (Dimensions,
Measures) in the DATA menu.
Under Dimensions, select the
Ctynamefield and drag it to the X Axis shelf.At this point, it is recommended that you alias the field as County. For more information, see Alias.
Wa malefield and drag it to the Y Axis shelf.This first measurement provides the axis definition.
Add the other measurements to the Colors shelf.
Together with the measurement on the Y Axis, this creates the 'group' Cloudera Data Visualization uses to draw grouped bars.
For this example visual, add
Na Male, and
- On the Y Axis shelf, click the field, and from the FIELD PROPERTIES menu, select [ ] Enter/Edit Expression.
In the Enter/Edit Expression modal window, edit the
expression to the following:
sum([Wa Male]) + sum([Wa Female])
Click VALIDATE EXPRESSION, and then click SAVE.
Repeat the change in the expression on all the fields placed on the color
sum([Ba Male]) + sum([Ba Female]) sum([Ai Male]) + sum([Ai Female]) sum([Aa Male]) + sum([Aa Female]) sum([Na Male]) + sum([Na Female]) sum([Tom Male]) + sum([Tom Female])
- Alias the field on the Y Axis shelf as 'White', and alias the fields on the Colors shelf as 'Black or African American', 'American Indian and Alaska Native', 'Asian American', 'Native Hawaiian and Other Pacific Islander', and 'Two or More Races'.
Add the field
Stnameto the Filters shelf and select the value 'Alaska'.
- Under Dimensions, select the
Click REFRESH VISUAL.
The Grouped Bars visual appears.
Click the (pencil) icon next to the title of the visualization
to edit it, and change the title to
World Population - Grouped Bars.
- At the top left corner of the Dashboard Designer, click SAVE.