Skip to content

Add setting to skip header row in calculations#13

Open
Cattamer wants to merge 1 commit into
eatcodeplay:mainfrom
Cattamer:feature/skip-header-row
Open

Add setting to skip header row in calculations#13
Cattamer wants to merge 1 commit into
eatcodeplay:mainfrom
Cattamer:feature/skip-header-row

Conversation

@Cattamer
Copy link
Copy Markdown

Summary

  • Adds a new "Skip header row" toggle in settings
  • When enabled, the first row of each table is excluded from vertical (^) calculations
  • Useful when header rows contain numbers that shouldn't be included in sums, averages, etc.

Problem

When table headers contain numbers (e.g., "Q1 2024", "Item #", or numeric column labels), these get included in vertical calculations like sum^ or avg^, producing incorrect results.

Solution

A simple toggle that, when enabled, starts vertical calculations from row index 1 instead of 0, effectively skipping the header row.

Test plan

  • Enable "Skip header row" in settings
  • Create a table with numbers in the header row
  • Verify that sum^, avg^, etc. exclude the header values
  • Disable the setting and confirm headers are included again

🤖 Generated with Claude Code

When enabled, the first row of each table will be excluded from
vertical (^) calculations. This is useful when header rows contain
numbers that shouldn't be included in sums, averages, etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
mrjano pushed a commit to mrjano/obsidian-simple-table-math that referenced this pull request May 14, 2026
- Extend the direction grammar with `>` (right) and `v` (down), mirroring
  the existing `^`/`<` semantics including optional start:end ranges.
- When the user adds a row to a table whose last row contains a formula
  (e.g. via Obsidian's `+` button), automatically swap it so the formula
  row stays at the bottom and the new empty row lands above it.
- README: document the new directions, the existing `DIV` operation, the
  `Skip header row` setting (from upstream PR eatcodeplay#13), and add a fork notice
  describing what differs from upstream.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant