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

Pivoting #510

Closed
norberttech opened this issue Oct 4, 2023 · 1 comment · Fixed by #825
Closed

Pivoting #510

norberttech opened this issue Oct 4, 2023 · 1 comment · Fixed by #825
Assignees
Labels
Milestone

Comments

@norberttech
Copy link
Member

GroupBy could also allow pivot tables.

From:

+------+---------+------+
| Year | Product | Sale |
+------+---------+------+
| 2019 |   A     | 100  |
| 2019 |   B     | 200  |
| 2020 |   A     | 150  |
| 2020 |   C     | 300  |
| 2021 |   B     | 100  |
| 2021 |   C     | 150  |
+------+---------+------+

Through:

  • Group by Year
  • Pivot by Product
  • Aggregate Sum by Sale

Into:

+------+----+----+----+
| Year |  A |  B |  C |
+------+----+----+----+
| 2021 |null| 100| 150|
| 2019 | 100| 200|null|
| 2020 | 150|null| 300|
+------+----+----+----+
@stloyd stloyd changed the title Pivot New Pivot expression Oct 8, 2023
@norberttech norberttech changed the title New Pivot expression Pivoting Oct 25, 2023
@norberttech
Copy link
Member Author

I changed the title since I don't think that Pivot can be achieved through expressions, I think it needs to be added directly into GroupBy - just like Aggregations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant