Budgeting
You can tag accounts, total and filter the budget by tag, and rename or delete tags.
A tag marks accounts that belong together for a reason your categories and groups do not show, for example what the VFX cost, which accounts depend on the weather or which accounts carry the reduced tax rate. In the demo project, the tag Cast marks the accounts 2.01 to 2.05, from Lead Actor 1 to Extras. You need a budget open in **Budgeting**.
Select an account, a subaccount or a markup. In **Account Details**, click the **Tags** panel, or  **Settings for account details** in it. Either opens an input field. Type the name of the tag. KOSMA lists the existing tags that contain what you typed. Press `Enter`. KOSMA adds the tag highlighted in that list, or the tag with exactly that name. If no tag has that name, KOSMA creates it and adds it to the row.
A row can carry up to ten tags. To remove a tag from the row, click the cross  on the tag. In the empty field, `Backspace` removes the last tag. When a row carries ten tags, KOSMA shows this instead of the field:
The maximum number of tags in an account is reached.
When an account has subaccounts, KOSMA puts every tag you give the account on each subaccount. When you remove it from the account, KOSMA removes it from all subaccounts. If the account itself carries a tag, each subaccount shows it as an inherited tag. You can remove an inherited tag only on the account it comes from.
The budget also has an **Account Details** column. There, every tagged row shows a dot in the colour of the dot in the **Tags** panel. An account shows a half dot when only some of its subaccounts carry the tag.
Select the rows. If they all carry the same tags, the **Tags** panel shows these tags. Every tag you then add or remove changes all selected rows. If they carry different tags, the panel shows:
Mixed contents · Click ↺ to reset
To clear the tags of all selected rows and start again, click  **Reset tags**. KOSMA asks you to confirm.
When you confirm, KOSMA removes every tag from all selected rows.
To total every tagged account and subaccount, wherever it sits in the budget, write `SUM_TAG` with the tag's name in a formula. Deactivated rows don't count:
A markup can use this total as its base. In the project How KOSMA Calculates, account 103 carries the tag Cast and totals 1,000. A markup of 2% on `SUM_TAG("Cast")` comes to 20. For `COUNT_TAG` and totals by company or effect, see [aggregate by company, tag or effect](/kb/article/aggregate-by-company-tag-or-effect).
To work on the rows of one tag only, [filter the budget](/kb/article/filter-a-budget) with the filter type **Tag** and the tag as its value.
Select a row. In **Account Details**, click  **Settings for account details**. This is not the pen in the **Tags** panel, though both share that name. KOSMA opens the **Settings** menu. Choose **Tags**. KOSMA opens the **Tags** dialog with every tag of the budget. For each tag, **In Use** shows one number: rows that carry it plus formulas that name it. If three rows carry the tag and one formula names it, you see 4.
To add a tag, click  **Tag**. KOSMA adds a row named New Tag 1 and selects its name. Type the new name. To rename a tag, change its name in the **Name** column. Each name can exist only once and is not case-sensitive: Cast and cast are the same name. If the name already exists, KOSMA shows:
Name must be unique
When you rename a tag, KOSMA renames it in every formula too. Their results stay the same.
To reorder the tags, drag a row by its grip . Click **Ok** when you are done.
In the **Tags** dialog, click  **Delete tag** in the row of the tag. If **In Use** shows 0, KOSMA asks you to confirm. Otherwise, KOSMA opens **Delete Tag** with this message and, below it, the list of affected formulas, here for the tag Cast:
Are you sure you want to remove tag Cast? Deleting it will leave the formulas below pointing at a missing element. You can delete anyway and fix them later.
When you click **Delete anyway**, every formula in the list shows an error with a red frame until you fix it.
Click **Delete anyway** to delete the tag.
In these cases you can see the tags but cannot change them:
- on a Free licence, except in the demo project - in a budget shared with you without editing access - in a budget linked to a cost control set - when you are signed out
KOSMA greys out the controls in these cases. See [what your licence includes](/kb/article/what-your-licence-includes).
Markdown