Skip to content

Obsidian Bases filter not working? 12 fixes that actually work

If your Base is showing your entire vault or zero results, do not start with guesswork. Start with 2 questions:

  1. Is my filter in the right scope?
  2. Is the base evaluating the file and property types I think it is?

If you want the full system view first:

Screenshot: the Filter menu with "All views" and "This view" visible side by side. This matters because scope confusion is the fastest explanation for the majority of "filter not working" reports.


First: confirm what "not working" means

If the Base shows EVERY file

A base without filters shows all files in your vault. Official: Views

So either:

If the Base shows ZERO files

Usually:


90-second fix: add a Debug view

Screenshot: a Debug view with file.path, file.folder, file.tags, and file.links visible. This matters because the fastest way to fix a base is to make the hidden metadata visible before you touch the logic.

Add this temporary view so you can see reality:

views:
  - type: table
    name: Debug
    order:
      - file.path
      - file.folder
      - file.ext
      - file.tags
      - file.links
    limit: 200

File properties are documented here: Bases syntax (file properties)

Now you can answer:


Fix 1: Use the correct filter scope (All views vs This view)

Bases lets you apply filters to:

These scopes are described in Views

Most reliable pattern:

Example:

filters:
  and:
    - 'type == "task"'

views:
  - type: table
    name: Today
    filters:
      and:
        - 'due && due.date() == today()'

Fix 2: Quote filter statements in YAML when you hand-edit

The official examples often omit quoting, but quoting is a safe practice when you hand-edit YAML because it prevents parsing surprises.

Official schema: Bases syntax

Copy/paste safe style:

filters:
  and:
    - 'file.inFolder("Meetings")'
    - 'status != "Done"'

Fix 3: Use the right folder scoping function

Folder scoping is typically done with file.inFolder().

Official: Functions

Copy/paste:

filters:
  and:
    - 'file.inFolder("Projects")'

Fix 4: Folder was renamed, and your filter did not update

This is a real-world failure mode: renaming folders does not automatically update base folder filters.

See: Changing folder name does not updated Bases or workspaces and Moving or renaming bases folder does not update the bases filter

Fix: Edit the filter manually and update the folder name.


Fix 5: Use file.hasTag() for actual file tags

If you want tags in content + frontmatter, use file.hasTag().

Official: Functions

Copy/paste:

filters:
  and:
    - 'file.hasTag("project")'

Fix 6: Do not confuse tags.contains() with file tags

tags.contains("x") checks a frontmatter property named tags.
It does not mean "all tags in the file."

This difference is clarified here: Nested tags support clarification

If you meant file tags, switch to file.hasTag().


Fix 7: this changed meaning when you embedded the base

this is context-sensitive:

Official: Bases syntax (this)

Quick "this test" filter:

filters:
  and:
    - 'file.path == this.file.path'

If this matches the wrong file, your base is in a different context than you assumed.


Fix 8: Use file.hasLink(this.file) for backlinks-style queries

The docs mention this pattern explicitly as a backlinks-like use case.

Official: Bases syntax (hasLink example)

Copy/paste:

filters:
  and:
    - 'file.hasLink(this.file)'

Fix 9: Link vs string mismatch (the silent killer)

If your property stores links, comparing it to a string will not match.

Bad pattern:

- 'list(attendees).contains(this.file.name)'

Better pattern when attendees is a list of links:

- 'list(attendees).contains(this)'

list() and contains() are documented: Functions


Fix 10: List vs scalar mismatch (property is sometimes a list, sometimes one value)

Normalize with list().

Official: Bases syntax (list())

Copy/paste:

filters:
  and:
    - 'list(attendees).contains(this)'

Fix 11: Date filters: use today() and date() correctly

Date arithmetic and today() are documented here: Bases syntax (date arithmetic)

Copy/paste: due today

filters:
  and:
    - 'due && due.date() == today()'

Copy/paste: due in next 7 days

filters:
  and:
    - 'due && due <= today() + "7d"'

Fix 12: Reduce to a minimal repro base

If you still cannot tell what is wrong, remove everything and add one filter at a time:

views:
  - type: table
    name: Minimal
    filters:
      and:
        - 'file.ext == "md"'
    order:
      - file.path
    limit: 50

Then add:

  1. folder filter OR type filter
  2. then tag filter
  3. then the complex logic

Related reading