Trouble with dataview table with a GROUP and ORDER

I’ve been having a difficult time to get my view correct

It took me a while and some counting to see that the ‘main’ problem lied with the formatting of the table.

So I have switched to the minimal theme to Typewriter and there I could make the table 100% wide.
As there was still some layout,problems I needed to change the height of the LI and afterwards the layout is almost perfect.

This is the css code I have used:

table {
table-layout: auto !important;
width: unset !important;
max-width: 100%;
}

table li {
height: 30px;
list-style-type: none;

}


If I could just move everything a bit to the left this would be perfect.

Now the sort is not working on the last column and I don’t know why

I’d argue that the main problem of your query is that you’re grouping by the author (or the “Schrijver”), as this causes all the files with the same author to be collated into a list, and if you later on sort the grouped table you don’t actually sorting anything within the grouped list, like the series.

So I’d rather use a query like the following:

```dataview
TABLE WITHOUT ID
  Schrivjer, file.link as Boek, file.tags as Type, Serie
FROM "O2 - Boeken/Boeken"
SORT Schrijver, Serie, file.name
```

This should give you a list sorted by the author, the series and then the book title. But it’ll give you a duplication of the author in the first column, since we now have one row per book.

If you want to collate each author into one row per author per table, you do risk that the other columns misalign. For example if one book has a long title causing it to occupy more than one line in the column, it’s type and series will visually misalign. Given that caveat, you might try the following query:

```dataview
TABLE WITHOUT ID
  Schrivjer, rows.file.link as Boek, rows.file.tags as Type, rows.Serie
FROM "O2 - Boeken/Boeken"
SORT Schrijver, Serie, file.name
GROUP BY Schrivjer
```

Notice how I’ve added rows. in front of the last three columns to match the fact that these lines have been added as a list into the rows object (as compared to the previous query). Also note that here I sort before I group in the hope it’ll keep the sorting before it groups. In most cases this should work nicely.

Thank you, indeed the sorting before the grouping worked.