0

I am having trouble with using the formulas to create a cell that totals a column. Is it possible to dynamically add a line and a total cell to the bottom of clock report tables? because when I add a formula that usually makes a new row on normal tables, clock report tables don't seem to add any new rows where I'd like my formula data to be calculated. They seem okay adding columns but not rows?

This is what i have, and it always works with C-u C-c C-x C-u (org-dblock update)

#+BEGIN: clocktable :scope file :maxlevel 3 :tstart "[2019-03-04]" :tend "<now>" :step week :stepskip0 :link :formula "$5=$4*30;t"

Weekly report starting on: [2019-03-04 Mon]
| Headline                   | Time    |       |       |        |
|----------------------------+---------+-------+-------+--------|
| *Total time*               | *21:30* |       |       |   0.00 |
|----------------------------+---------+-------+-------+--------|
| Web stuff                  | 21:30   |       |       |   0.00 |
| \_  website [1/6]          |         | 21:30 |       |   0.00 |
| \_    Theme [0/2]          |         |       | 10:30 | 315.00 |
| \_    Implementation [0/2] |         |       | 11:00 | 345.00 |
#+TBLFM: $5=$4*30;t

This is what I'm looking for, by adding something like ::@7$5=vsum(@5$5..@6$5);%.2f to the block formula, or even add it to each table formula. I get an error either way:

#+BEGIN: clocktable :scope file :maxlevel 3 :tstart "[2019-03-04]" :tend "<now>" :step week :stepskip0 :link :formula "$5=$4*30;t::@7$5=vsum(@5$5..@6$5);%.2f"

Weekly report starting on: [2019-03-04 Mon]
| Headline                   | Time    |       |       |        |
|----------------------------+---------+-------+-------+--------|
| *Total time*               | *21:30* |       |       |   0.00 |
|----------------------------+---------+-------+-------+--------|
| Web stuff                  | 21:30   |       |       |   0.00 |
| \_  website [1/6]          |         | 21:30 |       |   0.00 |
| \_    Theme [0/2]          |         |       | 10:30 | 315.00 |
| \_    Implementation [0/2] |         |       | 11:00 | 345.00 |
|----------------------------+---------+-------+-------+--------|
|                            |         |       |       |*660.00*|
#+TBLFM: $5=$4*30;t::@7$5=vsum(@5$5..@6$5);%.2f

Its annoying to have to manually draw out the bottom parts of the table. I feel its within my grasp but I may meed custom elisp..

Thanks for any help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.