org-mode clock table by tag

I believe :tags changed between 2016 and the present (2020) so here is an "update":

In the docs (https://orgmode.org/manual/The-clock-table.html#The-clock-table) I see :tags explanation is this

‘:tags’

    When this flag is non-nil, show the headline’s tags.

And so :tags should just enable a column of tags. I tried :tags "mytag" and found that it did not filter as the OP asked. Rather :match "mytag" does this filtering.

‘:match’

    A tags match to select entries that should contribute. See Matching tags and properties for the match syntax.

From the OP then:

#+BEGIN: clocktable :maxlevel 2 :scope file :tags t :match "nicetag"
#+CAPTION: Clock summary at [2020-01-23 Thu 09:51]
| Tags    | Headline     |   Time |
|---------+--------------+--------|
|         | *Total time* | *3:34* |
|---------+--------------+--------|
| nicetag | Header one   |   2:34 |
| nicetag | A task       |   1:00 |
#+END:

* Header one :nicetag:
:LOGBOOK:  
CLOCK: [2016-07-23 Sat 18:24]--[2016-07-23 Sat 19:38] =>  1:14
CLOCK: [2016-07-23 Sat 12:23]--[2016-07-23 Sat 13:43] =>  1:20
:END:      
* Another header :bigtag:
:LOGBOOK:  
CLOCK: [2016-07-23 Sat 20:24]--[2016-07-23 Sat 20:34] =>  0:10
:END:
* A task  :nicetag:
:LOGBOOK:  
CLOCK: [2016-07-23 Sat 10:26]--[2016-07-23 Sat 11:26] =>  1:00
:END:

And without the :tags t we get the same result without the tags column

#+BEGIN: clocktable :maxlevel 2 :scope file :match "nicetag"
#+CAPTION: Clock summary at [2020-01-23 Thu 09:53]
| Headline     |   Time |
|--------------+--------|
| *Total time* | *3:34* |
|--------------+--------|
| Header one   |   2:34 |
| A task       |   1:00 |
#+END:

Do you mean?

#+BEGIN: clocktable :maxlevel 2 :scope file :tags "nicetag"

(Note the "" around your tag.) The error message shown in the echo area when you try to use it without "" is "Wrong type argument: stringp, nicetag", which means that Emacs expected to read a string but got something that wasn't. Hope that helps!

Tags:

Emacs

Org Mode