.base file. Bases are typically edited through the app interface, but you can also edit the underlying syntax directly or write it in a base code block embedded in a Markdown note.
Bases syntax is YAML-based. Filters and formulas share the same expression language.
Complete example
Here is a fully configured.base file:
Sections
filters
The filters section narrows which files the base includes. Without filters, a base shows every file in your vault.
Filters can be applied at two levels:
- Global — under the top-level
filterskey. Applies to all views. - Per-view — inside an individual view’s
filterskey. Applies only to that view.
AND when evaluating a view.
formulas
The formulas section defines computed properties available across all views:
properties
The properties section stores display configuration for properties:
summaries
The summaries section defines custom summary formulas. In the values expression, values is a list of all values for that property across every row in the result set:
views
The views section is a list of view configurations:
Properties in bases
Bases work with three types of properties:Note properties
Stored in the YAML frontmatter of Markdown files. Access withproperty_name or note.property_name:
File properties
Built-in properties available for all file types:this — context-aware file reference
Use this to reference the file where the base is displayed:
- Opened as a file:
thisrefers to the.basefile itself. - Embedded in a note:
thisrefers to the embedding note. - In a sidebar:
thisrefers to the active file in the main content area.
Operators
Arithmetic
Comparison
Boolean
Date arithmetic
Add or subtract durations from dates using string suffixes:
Subtracting two dates returns the difference in milliseconds.