Creating Segments from Filter Definitions

You can also create segments from existing filter definitions of a visual.

This article demonstrates how to create new data segments in the dataset Customer Value Analysis, based on data previously imported into Arcadia from the datafile customer-value-analysis.csvflights-2014-01.csv.zip.

To create a new data segment in the dataset Customer Value Analysis, follow these steps.

  1. Start a new visual based on dataset Customer Value Analysis; see Creating Visuals.
  2. From the available fields, under Dimensions, select State and drag it over Filters shelf on the main part of the screen. Drop to add it to the shelf.

  3. In the Filter for State window modal, select Arizona and Nevada, and click Apply.

  4. Click the (save down) icon to the left of the Filters shelf.

  5. From the menu, select Create New Segment.

  6. In the Add Segment window modal, specify the following:

    • Under Segment Name, enter Mountain.
    • Under Segment Group, enter Geographic Region.
    • Note that the Filters field contains the filter expression specified on the Filters shelf of the visual, [State] in ('Arizona', 'Nevada').
    • Leave Entity to Extract field empty.

    Click Save.

  7. Note that the new segment definition appears in Segments section on the left navigation menu, immediately above Fields.
  8. On the Filters shelf, at the right of the State filter, click the (down arrow) icon to open the menu.

    From the menu, select Clear values.

  9. Again, click the (down arrow) icon to the right of the State filter to open the menu.

    From the menu, select Select values.

  10. In the Filter for State window modal, select Washington, and click Apply.

  11. To define the next segment, select Create New Segment from the Save as Segment menu.

  12. In the Add Segment window modal, specify the following:

    • Under Segment Name, enter North West.
    • Under Segment Group, enter Geographic Region that we used earlier.
    • Note that the Filters field contains the filter expression specified on the Filters shelf of the visual, [State] in ('Washington').
    • Leave Entity to Extract field empty.

    Click Save.

  13. To demonstrate how to add specifications to an existing segment, Clear values on the Filters shelf, then Select values, and specify only Oregon in the Filter for State window modal.

    Click Apply.

  14. To add the new selection to an existing segment, select Add to Segment from the Save as Segment menu. In the secondary menu, under Geographic Regions, select North West.

  15. Notice that when the Edit Segment modal window appears, it shows the existing configuration for the segment North West.

    However, its Filters specification includes Oregon: [State] in ('Washington', 'Oregon').

    Click Save to finish adding the specification to the segment.

  16. Similarly, define a new segment, California, in the Geographic Regions segment group.

  17. Notice that all three segments (and the segment group) we just defined appear in the Segments menu.

  18. To demonstrate how segments work, select one of the options, and click Refresh Visual.

    Notice that the visual only shows the rows that match the segment criteria.

Lastly, remember that you can manage segments in the Dataset Segments user interface.