问题描述:

I have an org file, describing a project:

* task1

** task1-1

:PROPERTIES:

:price: 10

:given: <2012-11-08 Thu>

:END:

** task1-2

:PROPERTIES:

:price: 11

:given: <2012-11-08 Thu>

:END:

* task2

** task2-1

:PROPERTIES:

:price: 20

:given: <2012-11-08 Thu>

:END:

** task2-2

:PROPERTIES:

:price: 21

:given: <2012-11-08 Thu>

:END:

I used org-collector to produce a totals table:

#+BEGIN: propview :id global :conds ((not (= price 0))) :cols (ITEM price)

| ITEM | price |

|-----------+-------|

| "task1-1" | 10 |

| "task1-2" | 11 |

| "task2-1" | 20 |

| "task2-2" | 21 |

|-----------+-------|

| | 62 |

#+TBLFM: @6$2=vsum(@[email protected]$2)

#+END:

But I want to have something like this:

| ITEM | price |

|-----------+-------|

| "task1-1" | 10 |

| "task1-2" | 11 |

| "task2-1" | 20 |

| "task2-2" | 21 |

|-----------+-------|

| Total | 62 |

How to do it?

网友答案:

For the “Total” line, you can add a line |Total| |, press C-u C-c = in the empty cell (to define a formula for it), and enter the formula vsum(@[email protected]$2). (If you wanna recalc, that's C-u C-c C-c for all.)

I don't know about org-collector, so can't help you with this part. Run it on the entire document (is :id global working?), or shift everything by one level to the right for it to be inside a single tree, maybe.

相关阅读:
Top