hledger Verified current stable Not installed? Data Processing

Hledger / Include Zero Balances And Show Hierarchy

Include Zero Balances And Show Hierarchy

Displays the balance sheet including zero-value accounts, structured hierarchically for better visibility.

$
Terminal
hledger bs -E -t

When To Use

When needing a complete picture of accounts for audit purposes or comprehensive reporting.

Pro Tip

Use the `-t` flag to visualize the account hierarchy, which helps in identifying inactive accounts.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
hledger bs -E -t

Anatomy of Output

Understanding the result

Account: Assets Top-Level Account

Root level of account hierarchy.

Account: Current Assets Sub-Level Account

Breakdown of assets into categories.

Account: Cash, Balance: $5,320.00 Leaf Account

Final leaf showing actual balances.

Power User Variants

Optimized versions

hledger bs -E --tree

Displays empty accounts within a hierarchical structure.

hledger bs -t --monthly

Displays hierarchy along with monthly breakdown.

Troubleshooting

Common pitfalls

Error: No accounts available for display

Solution: Ensure accounts are correctly initialized and transactions exist.

Error: Tree representation failed

Solution: Check for circular dependencies in account hierarchy.

Warning: Including too many zero accounts may slow down rendering

Solution: Filter unnecessary zero accounts for performance.

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.
bs
bs|balancesheet
The value supplied for bs|balancesheet.
-E
E| empty
The value supplied for E| empty.
-t
t| tree
The value supplied for t| tree.
-E
Command Option
Tool-specific option used by this command invocation.
-t
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.