Dataview table with Index column

What I’m trying to do

A Dataview TABLE with a column with incremental numbers, something like this

| No | Name   | Color  |
| 1  | Apple  | red    |
| 2  | Orange | orange |
| 3  | Melon  | orange |

Things I have tried

I currently have a table working just want the No column to be auto-populated with the number of the row

1 Like

I don’t think it is possible to add a separate column for this, although rows can be numbered with CSS:

.table-view-table {
    counter-reset: section;

.table-view-table > tbody > tr > td:first-child::before {
    counter-increment: section;
    content: counter(section) ". ";

Source: Dataview plugin snippet showcase - Share & showcase - Obsidian Forum

1 Like

Thanks! shame that there is no way to do add the column though, I just want some specific tables to have the numbering but will look for solutions to add CSS to a single block

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.