Creating Segments from Filter Definitions

Besides creating segments in the dataset detail view, Arcadia Enterprise also lets you create segments from a filter definition of a visual.

See the following topics to create a new segment from a filter in a visual, then edit the filter to add another segment, and finally update an existing segment.

Creating the First Segment

Follow these steps to create a new data segment, Mountain from a filter definition:

  1. Start a new visual based on dataset Flight Delays, based on data previously imported into Arcadia from the data file flights-2014-01.zip. See Creating Visuals.
  2. Add originstate to the Filters shelf.
    Adding the dimension 'originstate' to the Filters shelf
  3. In the Filter for originstate window modal, select CO and WY, and click Apply.

    Entering filter values for 'originsate' field
  4. Click the (save down) icon to the left of the Filters shelf.

    Clicking save to open a 'new menu
  5. From the menu, select Create New Segment.

    Selecting 'Create New Segment' from a menu
  6. In the Add Segment window modal, specify the following:

    • Under Segment Name, enter Mountain.
    • Under Segment Group, enter Geographic Region.
    • Under Filters, notice the new filter expression, [originstate] in ('CO', 'WY').
    • Leave Entity to Extract field empty.
  7. Click Save.

    Adding values in the 'Add Segment" modal window
  8. Note that the new segment definition appears in Segments section on the right navigation menu.
    Viewing the new segment

Adding the Second Segment

Now, let's edit the filter defined in the first segment and create a second segment.

  1. On the Filters shelf, at the right of the originstate filter, click the (down arrow) icon to open the Filter Properties menu.

  2. From the Filter Properties menu, select Clear values.

    Clearing filter values
  3. Again, click the (down arrow) icon to the right of the originstate filter to open the Filter Properties menu.

    From the Filter Properties menu, select Select values.

    Clicking to select new values for the filter
  4. In the Filter for originstate window modal, select WA.

  5. Click Apply.

    Selecting filter values for 'originstate' field and clicking 'Apply'
  6. To define the next segment, select Create New Segment from the Save as Segment menu.

    Selecting 'Create New Segment' from a menu
  7. 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.
    • Under Filters, notice the new filter expression, [originstate] in ('WA').
    • Leave Entity to Extract field empty.
  8. Click Save.

    Clicking 'Save' to save the new segment values

Viewing the Defined Segments

In the side navigation bar of the visual interface, click Segments.

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

Viewing the defined segments

Adding Values to an Existing Segment

Let's add a new state, OR, to our existing segment North West.

  1. Click inside the Filter shelf to open the Field Properties menu.
  2. click Clear values
  3. Click Select values.
  4. Select OR in the Filter for originstate window modal.
  5. Click Apply.
    Selecting filter values for 'originstate' field and clicking 'Apply'
  6. To add the new selection to an existing segment, do the following:

    • Click Filters.
    • In the menu, select Add to Segment from the Save as Segment menu.
    • In the secondary menu, under Geographic Regions, select North West.
    Selecting an existing segment
  7. Notice that when the Edit Segment modal window appears, it shows the existing configuration for the segment North West.

    However, its Filters specification now includes Oregon: [originstate] in ('WA', 'OR').

  8. Click Save to finish adding the specification to the segment.

    Clicking save to finish adding specifications to the segment.

To view how segments work in a visual, see Using Segments in Visuals.