Skip to main content
When calculating required sample size, you can filter past assignments on flags to include only users similar to those in your upcoming experiment.

Why Filter Assignments

Users assigned by a flag that assigns all users behave differently from a flag that only assigns highly engaged users. This means the mean and variance of metrics differ for the two cohorts, and so do the required sample sizes. By filtering assignments in the exposure source on relevant flags, you ensure the exposure source is as similar as possible to your upcoming experiment.

Enable Assignment Filtering

1

Go to Admin > Assignment table

2

Select Edit query

3

Adjust the SQL query to include a flag column

Add a column called flag to your SQL query. The name can be in any case.
4

Select Run query

5

Add the column in the Flag dimension section

Add the column in the Flag dimension section at the bottom right corner.
6

Select Save

Filter Past Assignments on Flags

1

Select your experiment

Select the experiment you want to run the sample size calculation for.
2

Open the sample size calculation widget

Click the icon in the Required sample size section to open the sample size calculation widget.
3

Edit the exposure source

Click the edit icon in the Exposure source section to edit the exposure source.
4

Select flags to filter on

Select Assignments as the exposure source and add the flags you want to filter on.