# Hashtags

Hashtags are lightweight labels you add to transaction descriptions. They serve three purposes: they help the [Bkper Agent](https://bkper.com/apps/bookbot.md) identify accounts, they make transactions instantly **searchable**, and they enable **segment reporting** — balance values cross-referenced with a hashtag across accounts. For the conceptual overview, see [Core Concepts — Hashtags](https://bkper.com/docs/core-concepts.md#hashtags).

## Adding hashtags

Include a `#hashtag` anywhere in the description when recording a transaction. Bkper registers and indexes it automatically, making it available for autocomplete and search from that point on.

For example, recording an invoice number as a hashtag — `Office supplies 150 #inv4821` — makes it easy to locate both the issuance and the payment later. Click the hashtag in any transaction and Bkper instantly filters all entries tagged with it.

You can add multiple hashtags to a single transaction. A marketing expense might carry `#team_marketing #project_alpha #q1_2026`, enabling filtering from any of those perspectives.

## Hashtag hygiene

Books sometimes accumulate undesired hashtags that pollute search and autocomplete. For example, most team members might use **#taxi** for reimbursements, but a few record it as **#taksi** — which then fails to appear in the reimbursement report.

Correcting this involves two steps: fixing the transactions and removing the stale tag from the Bkper Agent.

### Correcting misspelled hashtags

Search for the misspelled hashtag — in this case **#taksi**.

Edit every matching transaction, replacing **#taksi** with the correct **#taxi** in the description.

Once no transaction references **#taksi**, it disappears from autocomplete and search results.

### Removing a hashtag from the Bkper Agent

Even after correcting all transactions, the [Bkper Agent](https://bkper.com/apps/bookbot.md) may still remember the stale tag and use it for account matching. To stop this, type **-#taksi** (with a minus sign) in the input field and press the red **Record** button.

This tells the Agent to discard that tag for future entries.

> **Note**
> If you do not edit the misspelled hashtag in older transactions, it will continue to appear in autocomplete and remain indexed for search. Unused hashtags are automatically ignored by the Bkper Agent after 90 days.
## Hashtags and the Bkper Agent

The [Bkper Agent](https://bkper.com/apps/bookbot.md) uses hashtags as one of its signals for identifying the correct From Account and To Account. If you've used `#rent` in a previous transaction with specific accounts, entering `#rent 2000` in the input field lets the Agent apply the same accounts automatically.

This means well-chosen, consistent hashtags improve recording speed — the Agent learns faster when the same hashtag always appears with the same account pattern. Conversely, inconsistent hashtags (like `#taxi` vs. `#taksi`) confuse the Agent and produce unreliable suggestions.

The `-#tag` syntax described above removes a hashtag from the Agent's memory. Hashtags that go unused for 90 days are automatically dropped from the Agent's learned patterns.

## Segment reporting

Hashtags enable **managerial accounting** — reports that slice financial data across dimensions that don't map to your Chart of Accounts. A single Account like "Travel Expenses" might contain trips tagged `#sales`, `#engineering`, and `#executive`. Hashtags let you see the balance for each segment without creating separate accounts.

### How it works

In the web app, clicking a hashtag filters all transactions carrying that tag. Combined with account or group filters, this gives you segment-specific views — for example, all `#project_alpha` expenses within your "Marketing" group.

In [Google Sheets](https://bkper.com/docs/guides/google-sheets.md), you can fetch balance values filtered by a hashtag using Bkper Functions:

```
=BKPER_BALANCES_TOTAL(bookId, 1, "group:'COGS' #projectB on:2025", FALSE, FALSE, TRUE)
```

This returns the balance for the "COGS" group filtered to transactions tagged `#projectB`, enabling pivot-style managerial reports directly in your spreadsheet.

> **Caution**
> Balance values filtered by hashtag are calculated for up to **3,000 transactions**. For segments with higher transaction volumes, consider using [dedicated accounts with groups](https://bkper.com/docs/guides/accounting-principles/modeling/tracking-departments-projects.md#approach-2-accounts-with-groups) instead.
### When to use hashtags vs. accounts

Hashtags are ideal when segments are fluid, numerous, or cross-cutting — projects that come and go, cost centers that overlap, or ad-hoc analysis dimensions. They keep your Chart of Accounts clean and are the fastest approach to implement.

For segments that are stable, have high transaction volumes (above 3,000 per report), or need instant balance visibility without running a query, dedicated accounts within groups are a better fit. See [Tracking Departments & Projects](https://bkper.com/docs/guides/accounting-principles/modeling/tracking-departments-projects.md) for a detailed comparison.

## Hashtags in queries

Hashtags work with the [query language](https://bkper.com/docs/guides/using-bkper/search-and-queries.md). Clicking a hashtag in any transaction runs a search, but you can also type hashtags directly in the search bar and combine them with other operators:

- `#project_alpha after:$m-6` — all transactions tagged `#project_alpha` in the last 6 months
- `account:Cash #reimbursement` — reimbursement-tagged transactions in the Cash account
- `group:'Travel' #q1_2026` — travel expenses for Q1

In Google Sheets, hashtags in query parameters filter both transaction lists ([BKPER_TRANSACTIONS](https://github.com/bkper/bkper-sheets#bkper_transactions)) and balance values ([BKPER_BALANCES_TOTAL](https://github.com/bkper/bkper-sheets#bkper_balances_total), [BKPER_BALANCES_PERIOD](https://github.com/bkper/bkper-sheets#bkper_balances_period)).

## Scope and limitations

- Hashtags are **scoped to a Book** — each Book has its own set of indexed hashtags.
- Hashtags attach to **transactions only** — they don't apply to accounts, groups, or other entities.
- There is **no hierarchy** within hashtags — they are flat labels. For nested categorization, use [Groups](https://bkper.com/docs/guides/using-bkper/groups.md#group-hierarchies).
- Balance reporting with hashtags supports up to **3,000 transactions** per query. Beyond that, use accounts with groups for segment reporting.
