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.
Select an account, a subaccount or a markup. In **Account Details**, click the **Tags** panel, or  **Edit tags** in it, and 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 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**.
To clear the tags of all selected rows and start again, click  **Reset tags**. KOSMA asks you to confirm.
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  **Panel settings**. This is not the pen in the **Tags** panel. 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.
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 lists the formulas that name the tag. If you click **Delete anyway**, each of them shows an error with a red frame until you fix it.
**If you cannot add or remove a tag.** If KOSMA greys out the controls, the budget is read-only, for example on a Free licence, in a budget shared with you for reading only, in a budget linked to a cost control set, or when you are signed out. When you point at a greyed-out control, KOSMA names the reason. See [why a budget is read-only](/kb/article/save-discard-and-read-only).
Markdown