Segments
Group selections for easy access
What is a Segment?
Segments can be thought of as a group of cross filters. These allow us to save an arbitrary amount of filters on several columns that may make semantical sense.
For example, you could save demographic data in a more approachable way. In the titanic dataset, we have age and gender in two different variables. Assuming we wanted to have a coarse perspective on these two factors, like Young vs Old people, and Men vs Women, we could create a “Demographics” segment.
![Demographics segment in Graphext](https://mintlify.s3-us-west-1.amazonaws.com/graphext/images/segments.webp)
By creating these four segments, we now have a very quick way to reach for the “Young Men” category, which would involve selecting all Male passengers under the age of 25.
This is a simple example, but we could compose an arbitrarily complex filter, which would make reaching for these specific rows much easier.
How it works
As we can see, this process just involves creating a new multivalued column that assigns the name of the segment to the selected rows. If the row was present in the initial filter, the row gets that category in the column. We can see that some rows may be included in several filters, hence the multivalued column that can store an array of different values.
![](https://mintlify.s3-us-west-1.amazonaws.com/graphext/images/segments-column.webp)