tgrosinger / advanced-tables-obsidian

Improved table navigation, formatting, and manipulation in Obsidian.md
GNU General Public License v3.0
2.14k stars 80 forks source link

Enable referencing second last row in formulas #334

Open StegSchreck opened 5 months ago

StegSchreck commented 5 months ago

Is your feature request related to a problem? Please describe. I want to have multiple rows filled via formulas. The second to last row should have some computed values (e.g. a sum of all values in that column above) and the last row should have values based on that.

Describe the solution you'd like I want to be able to use @-1 or @>-1 as a reference for the target of a formula as well as an input for another formula. e.g.

<!-- TBLFM: @>-1$4=sum(@I..@-2) -->   # sum of the column
...
<!-- TBLFM: @>$4=((@>-1$3 - @>-1$4) / 2) -->   # derived value based on the previously calculated ones

Describe alternatives you've considered Only alternative I have found: have lots of empty columns just for calculating a few values.

SoCoLDuk commented 4 months ago

Hi! Have you been able to find a solution to how to get a ref to the second last row in formulas?