Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group By: add straightforward possiblility to do aggregations over all records #6976

Open
wvdvegte opened this issue Jan 2, 2025 · 3 comments
Labels
meal This will take a day or two

Comments

@wvdvegte
Copy link

wvdvegte commented Jan 2, 2025

What's your use case?
What's your proposed solution?
Sometimes it is useful to have several aggregations of selected variables over all the data records. To that end, it would be nice to have "all rows" as an option in the column on the left in the Group-by interface

Are there any alternative solutions?
The obvious trick to achieve this with the current functionality is to introduce a dummy variable that has the same value for all rows, and to group by the dummy variable. However, as a workaround it is not that intuitive.

@janezd janezd self-assigned this Jan 10, 2025
@janezd
Copy link
Contributor

janezd commented Jan 10, 2025

We had quite a discussion at today's live meeting.

Arguments against were that this is not something commonly used and it doesn't belong to Group by because it's about aggregation not grouping. On the other hand, everything is already in the widget.

We could have an option "All rows", but it would sound wrong - how do you group by all rows?

We found a compromise solution. Currently you can select multiple variables, but you have to select at least one. We can allow to deselect all variables and therefore "group by nothing" (= not group).

@janezd janezd added the meal This will take a day or two label Jan 10, 2025
@janezd janezd removed their assignment Jan 10, 2025
@wvdvegte
Copy link
Author

That could be a solution albeit not a very intuitive one.

@janezd
Copy link
Contributor

janezd commented Jan 10, 2025

I know. We had this in mind. On the other hand, it's not intuitive to use the Group By widget to aggregate over all data, so our reasoning was that if anybody actually uses this widget for that purpose, he'll get this idea precisely by seeing that he can "group by nothing".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meal This will take a day or two
Projects
None yet
Development

No branches or pull requests

2 participants