Segmentation
Segmentation is a powerful and flexible tool for visualizing trends and compositions in your data. You can analyze events, cohorts, and user profiles, and display the results in various chart types.
Advanced segmentation features let you create formulas and compare current and past data.

Use cases​
Here are some sample questions you can answer with segmentation:
-
High-level product analytics
- How is my WAU (weekly active users count) changing over time?
- How often are my users getting value?
- What is the distribution of my users across regions, devices, etc.? (property breakdown)
-
B2B (in this case, a messaging application)
- How many messages were sent in the US in the past 30 days?
- How many users had a mobile app session yesterday? (unique events)
- How many messages are sent per session? (formulas)
- How much revenue was generated on plans purchased in the past year? (property aggregation)
- How has the power users cohort grown over the past 6 months? (cohort trends)
-
Marketing
- Which advertising campaigns generate the most checkouts? (property breakdown)
- Which advertising campaigns generate the most revenue? (property aggregation)
-
Revenue analytics
- Show me the change in MRR from our US-based customers over the last year.
- What is our current MRR?
Segmentation basics​
You have already learned the basics of segments in Mitzu. This section covers the most essential segment concepts for user (or any other entity) segmentation.
Segmentation analysis​
Segmentation analysis finds behavioral patterns in your user (or other entity) data. In Mitzu, segmentation focuses on comparing the behavior of different segments of users (or other entities) and identifying the differences between them.
Examples of segmentation analysis​
Let's look at some examples of segmentation analysis:
I want to compare the number of users who visited our landing page with the number who started a trial in the last 30 days.
This can be done by simply creating two user segments in the segments panel (left side of the page).
For the first segment, we choose users who performed the Page viewed event. For the second segment, we select users who performed the Trial started event. Both segment definitions will be decorated with the Count uniques aggregation. This means we will count the unique users in each segment, since the Analyze uniques by option is set to Users. We will set the time window to 1M and use the Daily trend measurement type. Finally, we will visualize this as a line chart.

Let's take this a step further and calculate the ratio between the two segments.
You can do this by creating a simple formula under the segment panels. The formula should be A / B, where A refers to the first segment and B refers to the second segment.

As you can see, there are, on average, 50 page visits per Trial started event, which is great for our hypothetical SaaS business. However, I want to see the big picture. Let's zoom out and see how this measurement has changed over the last six months. To do this, I need to change the time horizon to 6M and use the weekly trend measurement type.

As you can see, the overall pattern stays the same. However, six months ago, we had a lot fewer page visits for every trial. This is something we should investigate further. In practice, to investigate further, I would switch to funnel analysis and see which marketing campaigns drove the most traffic to our landing page, and which had the highest conversion rate to trial-start events.
For now, I will stop here. This example was intended to show you what an investigation looks like in Mitzu.
Segmentation features​
In this section, we will cover the features that extend the basics of Mitzu insights. Segmentation is a special insight type because you can select multiple segments of users for comparison. You can also choose how you measure the segments.
Segment aggregation types​
You can perform per-segment measurements with the Aggregation type component.
By default, the aggregation type is set to Count uniques, which means we count the number of unique users in each segment.

If the Analyze uniques by setting is set to Groups, Mitzu counts the number of groups in each segment.
If Analyze uniques by is set to anything else, such as session_id, count uniques measures the number of unique sessions in each segment.
Count event totals​
This aggregation type counts the number of events in the segment.

In the example above, two segment definitions were defined with the same event, Page viewed.
The blue line shows the number of events performed by the segment's users, while the green line shows the number of unique users in the segment.
Frequency​
Frequency divides the number of events in the segment by the number of unique entities (users by default). It answers questions like "How many events does each unique user perform on average?" without forcing you to write a formula.
This is equivalent to the formula A / B, where A is the same segment with Count event totals and B is the same segment with Count uniques. Use Frequency when you want one segment instead of two.
Aggregate property​
This aggregation type aggregates the property values of the segment.
- First, choose the aggregation function. Currently, we support the following aggregation functions:
- Count distinct
- Sum
- Average
- Min
- Max
- Median
- P75
- P90
- P95
- P99
Except for the Count distinct aggregation function, the aggregation functions only work with numeric properties.
How many different marketing campaigns did we run in the last 60 days?
This question can be answered by choosing the Count distinct aggregation function and selecting the Campaign property. This counts the number of distinct campaigns for which at least one page visit occurred.
Formulas​
With formulas, you can apply algebraic expressions to your segmentation analysis. The most common use case is calculating the average number of events per user.

In the example, we are visualizing the number of events per user per day as a trend.
Formulas support the following algebraic operations:
+addition-subtraction*multiplication/division
Mitzu also supports parentheses () in these expressions.
Letters refer to segment definitions, for example:
A- the first segmentB- the second segment- ... and so on ...
This is a valid formula for percentage calculations: (A * 100) / B.
Formula breakdowns​
If you are using a formula and want to break down your results by a property, the exact same property must be used in each segment definition referenced in the formula.
What is the average number of page visits per user per day, broken down by the Campaign property?

Post-processing​
Post-processing options are only available in segmentation analysis. These operations are not performed in SQL in your data warehouse, but in the Mitzu backend on the result dataset.
Currently, we support these post-processing operations:
- Rolling average with various window sizes
- Cumulative sum
Rolling averages​
Post-processing with rolling averages is useful for "smoothing" your result charts.
Without post-processing, the chart looks like this:

With post-processing, the chart looks like this:

The overall trend is easier to read with post-processing.
Cumulative sum​
Cumulative sum helps you calculate the running total of any measurement. For example, how many total visits happened over the last 6 months?

Forecasting​
When a trend granularity is selected, segmentation insights support Forecast from the More menu. This is most useful for monitoring metrics where you care about the upcoming trajectory (DAUs, weekly signups, MRR).
Segmentation insights always read every event — there are no event-resolution or uniques-sampling controls in the segment panel. See Data sampling and resolution for context on which insight types support sampling.
Comparison​
The Comparison feature lets you analyze data trends by comparing them against those from a previous time period. For example, you can compare data points from the last month with those from the month before.
To use this feature:
- Select the desired comparison window from the dropdown menu.
- Choose a comparison method by selecting the appropriate icon next to the dropdown.
In segmentation, comparison can be performed using either of the following methods:
- Absolute values - select the
#icon. - Percentage values - select the
%icon.

Comparison with absolute values​
When comparing with absolute values, the system displays both:
- the data points from the selected insight time window, and
- the data points offset by the chosen comparison time period.
Both trends are visualized together on the same chart, making it easy to identify similarities or differences between the two time windows.

Comparison with percentage values​
When comparing with percentage values, the system calculates the percentage difference between each data point and its corresponding value at the comparison time offset.
The result is displayed as a single trend line representing percentage changes over time, making it easy to observe relative growth or decline.
