question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GROUP BY field AS name doesn't rename the "Group" heading

See original GitHub issue

What happened?

The docs seem to suggest that you can use GROUP BY field AS name to rename the “Groups” column heading. I have a test query:

```dataview
TABLE
	rows.file.link AS "Thing",
	rows.colour AS "Colour"
FROM #thing
GROUP BY type
```

which as expected produces a table like this:

Group Thing Colour
animal Black Cat black
  Brown Dog brown
  White Cat white
plant Green Plant green
  Red Plant red

But when I change the query to:

```dataview
TABLE
	rows.file.link AS "Thing",
	rows.colour AS "Colour"
FROM #thing
GROUP BY type AS "Type"
```

I get exactly the same result - with the first column still called “Group” rather than “Type”.

Debug Info

SYSTEM INFO:
	Obsidian version: v0.14.5
	Installer version: v0.14.2
	Operating system: #1 SMP Debian 5.15.15-1 (2022-01-18) 5.15.0-3-amd64
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: on
	Live preview: on
	Legacy editor: off
	Base theme: light
	Community theme: none
	Snippets enabled: 0
	Safe mode: off
	Plugins installed: 1
	Plugins enabled: 1
		1: Dataview

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.

DQL

TABLE
	rows.file.link AS "Thing",
	rows.colour AS "Colour"
FROM #thing
GROUP BY type
TABLE
	rows.file.link AS "Thing",
	rows.colour AS "Colour"
FROM #thing
GROUP BY type AS "Type"

JS

No response

Dataview Version

0.4.26

Obsidian Version

0.14.5

OS

Linux

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
laurastephsmithcommented, Apr 13, 2022

I never added this functionality, but that’s because I had never thought of it! I will fix this for the stable 0.5 release.

Awesome 😃. I quite like the thought that someone writing the docs invented the feature without coding it… 😉

1reaction
blacksmithgucommented, Apr 19, 2022

Fixed for 0.5.13!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't rename Group in Excel Pivot Table
click in the cell with the group name and press F2, then you can type the new name for the group.
Read more >
Rename a field or item in a PivotTable or PivotChart
Click the field or item that you want to rename. · Go to PivotTable Tools > Analyze, and in the Active Field group,...
Read more >
Renaming Column Names in Pandas Groupby function
Let's say we want to group by columns A, B and aggregate column C with mean and median and aggregate column D with...
Read more >
How to Troubleshoot and Fix Excel Pivot Table Errors
The pivot table error, "field name is not valid", usually appears because one or more of the heading cells in the source data...
Read more >
How to rename group or row labels in Excel PivotTable?
Rename Row Labels name ... To rename Row Labels, you need to go to the Active Field textbox. 1. Click at the PivotTable,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found