> ## Documentation Index
> Fetch the complete documentation index at: https://docs.francis.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Conditionally Assign General Ledger Categories

> Use IF statements to present amounts as assets or liabilities depending on the sign.

<iframe width="720" height="467" src="https://www.loom.com/embed/f53e62ce5dd54d18b61b0b12a8a2b5f2?sid=e422ed44-90ae-4c70-9f87-2a9a8f91a925" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen />

## Overview

Using an IF statement, it’s possible to display a general ledger account under assets or liabilities based on whether its amount is positive or negative. This approach is most useful when it’s not feasible to create separate accounts for positive and negative balances in your ERP.

<Tip>
  If possible, resolve this “at the source” (your accounting system) by creating two accounts – one for assets and one for liabilities – and moving amounts between them based on the sign. If that can’t be done, follow the steps below.
</Tip>

## Basics

Follow these steps to set up formulas that display amounts correctly under assets and liabilities:

<Steps>
  <Step title="Separate the GL account">
    Temporarily remove the relevant account from your main balance sheet and place it in a separate sheet. This makes it easier to reference its amounts in future steps.
  </Step>

  <Step title="Add a row on the opposite side">
    If the original row was under assets, create a corresponding row under liabilities (or vice versa). These two rows will work together to display amounts correctly.
  </Step>

  <Step title="Create IF statements">
    Assign values to each row using conditional formulas. For instance:

    ```typescript theme={null}
    // Asset row: Show positive amounts
    if("Bank account"[0]>0,"Bank account"[0],0)

    // Liability row: Show negative amounts
    if("Bank account"[0]>0,0,-"Bank account"[0])
    ```
  </Step>

  <Step title="Extend to other periods">
    Apply these formulas from a period far enough back to capture all relevant data, and ensure they continue for any future periods you plan to forecast.
  </Step>
</Steps>
