Configuring a cross tabulation visual for expansion

Follow these steps to enable expansion for a cross tabulation visual.

In this example, we show how to enable expansion on the year and state fields.

  1. Start a new cross tabulation visual based on dataset US State Populations Over Time [data source main.census_pop]; See Creating a visual.
  2. Populate the shelves from the available Fields (Dimensions, Measures) in the Data menu.
    1. Add year and state to the Row shelf.
    2. Add population to the Measures shelf. Ensure that the default aggregation is sum(population).
    3. Add year to the Filters shelf, set it to 1990 and 2000, and click Apply.
    4. Similarly, add state to the Filters shelf, select values AK, AL, AR, and AZ, then click Apply.
  3. Click Refresh Visual.
  4. When the cross tabulation visual appears, it does not have subtotals and the combined total in the rows and columns.
    Cross tabulation visual without expansion enabled

    Next, let's enable these options.

  5. On the Row shelf, click year.
  6. In the Filter Properties menu, click Expansion, and then click Enable Expansion. A green dot appears to the right of the option.
    Enabling expansion on the 'year' field
  7. Similarly, click state on the Row shelf, and enable expansion on that field.
  8. Click Refresh Visual to see the changes.
  9. The visual appears with a + icon in the year and state columns. This indicates that you can expand the data.

    The sum(population) column shows the combined population for both years.

    Viewing the visual with expansion enabled