Financing
You can size a balancing source from the plan's other sources, totalled by tag or status, and you know why such a total is empty or 0.
A balancing source, such as gap financing, covers what the other sources leave open. Four functions in a source's **Amount** total the sources of the same plan. To change an **Amount**, you need a licence that lets you edit Financing ([what your licence includes](/kb/article/what-your-licence-includes)). For the functions that take their figures from the linked budget, see [reference the budget in a source amount](/kb/article/reference-the-budget-in-a-source-amount).
Double-click the **Amount** cell of the balancing source, or select it and press Enter. While you type, KOSMA shows a list of suggestions.
Type the function's name, or open  **Functions** in the list of suggestions. Click a `FINANCING_` function to insert it. For `SUM_TAG_F`, point at the function and click the tag in its list: KOSMA inserts the whole call with the name in quotes.
| Function | Totals the Amount of the plan's sources that … | | ----------------------- | ---------------------------------------------- | | `SUM_TAG_F("…")` | carry the tag you name | | `FINANCING_CONFIRMED()` | have the status **Confirmed** | | `FINANCING_SUBMITTED()` | have the status **Submitted** | | `FINANCING_PENDING()` | have the status **Pending** |
If you type the call yourself, type the tag in quotes exactly as the plan has it. Without `_F`, `SUM_COMPANY` and `SUM_TAG` total the budget. The list also offers `SUM_COMPANY_F` and `SUM_EFFECT`, but a company or effect name in them currently leaves **Amount** and **Total** empty.
Complete the formula, then leave the cell. **Total** shows the result. For example, gap financing covers the budget's grand total (`GT`) less the confirmed and the submitted money:
Another formula covers the grand total less every source with the tag soft money:
Do not give the balancing source the company, tag, effect or status its formula totals. In the first example, its status stays **Pending**.
Each function adds up the **Amount** of the matching sources, converted from each source's own currency. This is the same figure the **Total** column shows. Installments do not count. `SUM_TAG_F` also counts deactivated sources. The three `FINANCING_` functions leave deactivated sources out, as the status totals next to the grid do ([deactivate sources, groups and countries](/kb/article/deactivate-financing-rows)).
A source has one company and one effect, but it can carry several tags. It then counts in the total of each of its tags. The tags belong to the plan: `SUM_TAG_F` finds the tags you give sources in **Tags**, not the tags of the budget. For how to assign them, see [assign a company to a source](/kb/article/assign-a-company-to-a-source), [assign an effect to a source](/kb/article/assign-an-effect-to-a-source) and [tag, note and attach files to a source](/kb/article/tag-note-and-attach-files-to-a-source).
**Amount** and **Total** stay empty when the formula names a tag the plan does not have. The cause is often a typing error inside the quotes. KOSMA does not mark such a name as **Invalid** and saves the formula. Correct the name so that it matches the name in the plan exactly. A matching source with an empty **Amount** also leaves the whole result empty. Enter an **Amount** for that source.
If a part outside the quotes is unknown, such as a function name with a typing error, the cell shows **Invalid** while you type. When you point at **Invalid**, KOSMA names the unknown part:
Unknown part of expression: {names}
**If a function adds up to 0.** If the plan has the tag but no source carries it, `SUM_TAG_F` gives 0.
Markdown