hledger Verified current stable Not installed? Data Processing

Hledger / Show End Balances For Assets Liabilities

Show End Balances For Assets Liabilities

Calculate the ending balances of specified accounts for a given financial period.

$
Terminal
hledger balance -H -p 'quarterly in 2024' assets liabilities

When To Use

During quarterly financial reviews to assess asset and liability positions.

Pro Tip

Use the -A flag for asset grouping adjustments that may not be reflected in default settings.

Anatomy of Output

Understanding the result

2024-04-01 Assets $100,000.00 Account Name

Opening balance for the asset category.

2024-04-01 Liabilities $50,000.00 Account Name

Opening balance for the liability category.

2024-03-31 Balance $50,000.00 Net Position

Calculated as assets minus liabilities.

Power User Variants

Optimized versions

hledger balance -H --format json

Output balances in JSON format for integration with other tools.

hledger balance --depth 2 -p 'quarterly in 2024' assets liabilities

Provides a more detailed view of nested account balances.

Troubleshooting

Common pitfalls

No transactions found for this period.

Solution: Ensure that transactions exist in the specified period.

Invalid account type specified.

Solution: Check account type validity; use correct account names.

Unknown option '-H'.

Solution: Verify command syntax for unsupported flags.

Command Breakdown

What each part is doing

hledger
Base Command
The executable that performs this operation. Here it runs Hledger before the shell applies any redirect operators.
-H
Command Option
Tool-specific option used by this command invocation.
-p
Command Option
Tool-specific option used by this command invocation.

Alternative Approaches

Comparable commands in other tools

Alternative data processing tools for the same job.