How the Second Filter Works in Anki Filtered Decks
Set the first filter to two cards and the second to four, and Anki can build a five-card deck. In the example below, the first filter takes one of the second search's four matches. Enable second filter gives each search its own limit and sort order. Anki moves the first filter's picks into the deck before it runs the second search. Anki's filtered deck manual · Released build code

Set up two searches in Anki
In desktop Anki, choose Tools → Create Filtered Deck and name it Test Session. To edit a filtered deck you already have, open it and click Options. Enter the first search and check Enable second filter to reveal the second set of fields. Anki's desktop dialog
For the first search, enter 2 in Limit to and choose Order due.
deck:"French Practice" is:due is:review -is:learn tag:priority
Set the second search's limit to 4 and choose Increasing intervals.
deck:"French Practice" is:due is:review -is:learn tag:drill
Replace the deck name and tags with yours. The terms is:due is:review -is:learn select reviews due today or earlier, excluding cards in learning or relearning. Check each search in Browse with Cards mode selected. Anki's card-state search reference
For extra practice with the original due dates, turn off Reschedule cards based on my answers in this deck. That setting applies to both filters. Click Build for a new deck or Rebuild when editing an existing one. Preview mode walkthrough · Build and Rebuild labels
Why two plus four can give you five cards
These six due reviews come from a test collection run with the released Anki 26.09.4 backend. The test checked which cards entered the deck and the initial study order before any answers. The desktop steps follow Anki's manual and dialog code. Anki 26.09.4 release
| Card | Tags | Due date | Interval |
|---|---|---|---|
| A | priority | 3 days ago | 12 days |
| B | priority, drill | 2 days ago | 20 days |
| C | priority | Yesterday | 30 days |
| D | drill | 4 days ago | 10 days |
| E | drill | Today | 5 days |
| F | priority, drill | Today | 15 days |
The first search finds A, B, C, F. Order due puts the earliest dates first, so its two places go to A and B. C stays in its home deck because the first filter is full and C has only the priority tag.
The second search finds B, D, E, F in Browse before Build. When Anki runs it during Build, B is already in the filtered deck. Increasing intervals takes E, D, F in order of their 5-, 10-, and 15-day intervals. F matches both searches and gets in through the second filter because it was still available. Anki's filtered deck sort orders
The initial study order was A → B → E → D → F, with rescheduling on or off. Lowering the second limit to 2 cut F. Swapping the two filters with their original limits and sort orders brought in all six. The drill search took E, D, F, B first, leaving A and C for the priority search.
For cards that carry both tags, leave Enable second filter off and put both tags in one search. The query below matched B and F. To include either tag under one shared limit and sort order, replace the two tag terms with (tag:priority or tag:drill). Anki's search rules
deck:"French Practice" is:due is:review -is:learn tag:priority tag:drill
Add one new card to a batch of reviews
The same test collection had two new cards tagged drill. The note for G was added before the note for H. This setup took D and A, the two earliest due reviews, and gave G the one new-card place.
| Filter | Search | Limit | Order |
|---|---|---|---|
| First | deck:"French Practice" is:due is:review -is:learn |
2 | Order due |
| Second | deck:"French Practice" is:new tag:drill |
1 | Order added |
With rescheduling on and the default deck options, the initial study order was D → G → A. The new card appeared between the reviews even though the second filter picked it. If the sequence matters to you, check the study queue after building. For order settings in regular decks, see Anki review sort order.
Find out where a missing card went
- If the filtered deck already contains cards, click Empty to send them home before checking the two searches. In the test, Empty before any answers restored the cards' original states and due dates. Anki's home deck controls
- Run both searches in Browse. In the filtered deck options, Show any excluded cards shows matches from either search that are suspended, buried, or already in another filtered deck. Check the two limits and overlap separately. How Anki finds excluded cards
- Sort the eligible first-search matches and take up to its limit. Cross those cards off the second list before applying its sort order and limit. Rebuild, then search
deck:"Test Session"in Browse to see which cards made it in.
AI assisted with the article and backend tests and generated the cover illustration.