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

[data grid] Implement Pivoting #214

Open
oliviertassinari opened this issue Aug 22, 2020 · 45 comments
Open

[data grid] Implement Pivoting #214

oliviertassinari opened this issue Aug 22, 2020 · 45 comments
Assignees
Labels
component: data grid This is the name of the generic UI component, not the React module! design This is about UI or UX design, please involve a designer linked in docs The issue is linked in the docs, so completely skew the upvotes new feature New feature or request plan: Premium Impact at least one Premium user priority: important This change can make a difference

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 22, 2020

What a pivot table is?

TLDR

Transform row data from given selected field(s) into column headers; values under these columns are aggregations of all the rows that share the same value on the selected fields(s)

A pivot table is a statistics tool that summarizes and reorganizes selected columns and rows of data in a spreadsheet or data table to obtain a desired report.

It’s an extension of the behavior of combining row grouping and aggregation.
With the ability to pivot columns, users can break down the row-grouped values in a new dimension, and the aggregation functions are used to compute the crossed values between rows and columns.

It’s a tool that targets end-users and enables them to build a new table by combining different computed values based on the original dataset.

How does pivoting work?

A pivot table is built over four distinct concepts.

  • Rows: When a field is chosen to provide the rows, it populates the first column with the unique values of that field. It’s the logic of Row grouping.
  • Columns: When a field is set for the columns, the unique values of that field are listed across the top as column headers. It is similar to Row grouping, but with columns.
    This property is what effectively gives the sense of data pivoting.
  • Computed values: When a field is chosen, its values are aggregated based on the cross between rows and columns established by the previous inputs. The most common aggregation are sum, average, minimum and maximum.
    It’s the logic from Aggregation, but extended to aggregate the value in multiple columns represented by a field’s unique values.
  • Filters: Filters original dataset.

Examples of use cases

  • https://www.youtube.com/watch?v=-LM6-BJd1HA

  • Extracting the sum of gold medals per country each year:

    Original dataset
    Original dataset

    Row group: Country,
    Columns: Year,
    Computed Values: Gold (sum)
    Row group: Country, Columns: Year, Computed Values: sum(Gold)

    Row group: Year,
    Columns: Country,
    Computed Values: Gold (sum)
    Row group: Year, Columns: Country, Computed Values: Gold

When a user turns on the pivoting:

  1. The Data Grid stops displaying the original dataset
  2. The Data Grid displays the tool for building the pivot table:
    • A list of all the available fields.
    • 3 inputs for columns, rows, and computed values.
    • Access to the filter panel to apply filters to the original dataset
  3. The Data Grid renders the pivot table based on which fields are used on each of the four inputs.

Where can users access this function?

At the new “Manage columns” panel
#5700

Challenges

  • UI/UX design of a pivoting panel
  • Rendering autogenerated Columns (maybe Column definitions)
  • Crossing Aggregation (Rows vs columns)

Benchmark

Screenshot 2022-05-03 at 14 34 27

@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request labels Aug 22, 2020
@oliviertassinari oliviertassinari added the linked in docs The issue is linked in the docs, so completely skew the upvotes label Nov 30, 2020
@ghost
Copy link

ghost commented Mar 11, 2021

im looking foward to it :D

@deepankarmalhan
Copy link

Has this been confirmed to be in Jul - Sep timeframe?

@oliviertassinari oliviertassinari changed the title [DataGrid] Implement Pivoting [XGrid] Implement Pivoting Jul 7, 2021
@oliviertassinari oliviertassinari added components: XGrid and removed component: data grid This is the name of the generic UI component, not the React module! labels Jul 7, 2021
@oliviertassinari oliviertassinari changed the title [XGrid] Implement Pivoting [DataGridPro] Implement Pivoting Aug 30, 2021
@LukeXF

This comment was marked as outdated.

@shubhamgoswamiofficial
Copy link

I thought we are the only one who always extend the deadline 😆

@dagi377

This comment has been minimized.

@akshaykadambatt

This comment has been minimized.

@oliviertassinari
Copy link
Member Author

We don't yet have a deadline for this feature. We have changed the roadmap presentation a bit. We now have an internal roadmap where we set ambitious targets and a public one where we try to under promise, so we can more consistently overdeliver.

@oliviertassinari oliviertassinari added plan: Pro Impact at least one Pro user plan: Premium Impact at least one Premium user labels Dec 5, 2021
@KlausFabian
Copy link

Main issue for me is that I can't make column headers stick - not being scrolled out.
Maybe there is a way but I didn't see it.

@m4theushw
Copy link
Member

@KlausFabian Is this what you're looking for? https://mui.com/components/data-grid/columns/#column-pinning

@KlausFabian
Copy link

KlausFabian commented Jan 18, 2022

@m4theushw That looks exactly what I have been looking for!!! Thanks a lot. But does that only work with the DataGridPro?

@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! and removed plan: Pro Impact at least one Pro user labels Jan 29, 2022
@oliviertassinari oliviertassinari changed the title [DataGridPro] Implement Pivoting [data grid] Implement Pivoting Mar 16, 2022
@rmrice

This comment was marked as resolved.

@GJmelody

This comment was marked as resolved.

@thespencercox

This comment was marked as resolved.

@ks0430

This comment was marked as resolved.

@h4r3en

This comment was marked as duplicate.

@h4r3en

This comment was marked as duplicate.

@vaynevayne

This comment was marked as duplicate.

@oliviertassinari oliviertassinari added the priority: important This change can make a difference label May 23, 2023
@olegschwarz

This comment was marked as duplicate.

@mrityunjay-cnuro

This comment was marked as duplicate.

@andrejremic

This comment was marked as duplicate.

@srgg
Copy link

srgg commented Jul 15, 2023

Is there any progress on this?

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jul 15, 2023

Is there any progress on this?

@srgg We recently moved the feature to "Next in queue" in our public MUI X roadmap https://github.com/mui/mui-x/projects/1#card-45123122

Screenshot 2023-07-15 at 18 05 20

Our next step is to run a proof of concept, we recently started to look into it.

Can anyone please please provide ETA for this

@h4r3en Assuming we plan for the worse case: the first unstable API release before the end of year and a stable API for March 2024 feels like something we won't struggle to pull off.

@cherniavskii cherniavskii self-assigned this Aug 1, 2023
@oliviertassinari oliviertassinari added design This is about UI or UX design, please involve a designer and removed design: ux labels Aug 18, 2023
@voidnothings

This comment was marked as resolved.

@scamden
Copy link

scamden commented Jan 18, 2024

the first unstable API release before the end of year

did this happen? can i test it somewhere?

@syuan100
Copy link

the first unstable API release before the end of year

did this happen? can i test it somewhere?

Would also like to know if unstable API is available somewhere

@olegschwarz

This comment was marked as resolved.

@cherniavskii
Copy link
Member

Hi everyone,
We plan to release the Pivoting feature this quarter!
Here is a proof of concept PR: #9877.
You can preview the feature here https://deploy-preview-9877--material-ui-x.netlify.app/x/react-data-grid/pivoting/ - give it a try.
The UI for pivoting will be different, but the overall concept will stay the same.
Let us know what you think!

@anu365
Copy link

anu365 commented Jan 30, 2024

Can we support fields to be searchable text instead of select box. As we can have thousands of columns and it will be difficult to scroll through them.

@srinivaassunil
Copy link

If you are looking for an alternative meanwhile, i have found this library
https://perspective.finos.org/

@delpiersos
Copy link

Is this still on track for this quarter?

@cherniavskii
Copy link
Member

Hi @delpiersos
We didn't make it in Q1, but it's on track for Q2.
You can check out the preview in #9877: https://deploy-preview-9877--material-ui-x.netlify.app/x/react-data-grid/pivoting/
We would appreciate your feedback!

@delpiersos
Copy link

Hi @delpiersos We didn't make it in Q1, but it's on track for Q2. You can check out the preview in #9877: https://deploy-preview-9877--material-ui-x.netlify.app/x/react-data-grid/pivoting/ We would appreciate your feedback!

Hi @cherniavskii - thanks for the update, really hoping to see it soon.
Some feedback on the preview you've shared (not sure if there's anything more recent); note i'm a PM, not an engineer - apologies if my views appear to take things too simply or I'm missing a technical point somewhere:

  • When opening the "Columns" or "Filters" menus in the top - columns get repeated - seemingly to n (i.e. the matching the number of occurrences across the data set). Really, these data elements are common entity across all entries, so by removing "Gross", it should be removing it from all pivot columns.
  • Filters similarly should only contain each unique item in that way, when I filter on "Gross", I'm expecting to just pick Gross and my filter, and show items that match, regardless of the Year group or whatever it might be. I should also be able to filter on "Year" (the column) in this example, but it's not available.
Screenshot 2024-05-08 at 1 39 18 PM - Given that the Values contain items that should allow mathematical operators - i.e. sum of Gross, avg of rating; I would expect the filters to allow for numeric filtering like the below, but perhaps the data set is poorly defined?: -- greater than, greater than or equal to -- less than, less than or equal to -- between
  • Let me hide the pivot controls to take back screen real estate to view the results

It's really encouraging progress; the feedback above make it a bit difficult to incorporate into my use case in a way that my users would be able to leverage.

@RomanMain
Copy link

Hey. @cherniavskii Can we know the approximate delivery time for this functionality in the stable version? Since Q2 is over, when can we expect it? Thank you!

@anu365
Copy link

anu365 commented Sep 23, 2024

Hey. @cherniavskii Can we know the approximate delivery time for this functionality in the stable version? Since Q3 is also over, when can we expect it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! design This is about UI or UX design, please involve a designer linked in docs The issue is linked in the docs, so completely skew the upvotes new feature New feature or request plan: Premium Impact at least one Premium user priority: important This change can make a difference
Projects
Status: 🏗 In progress
Status: In progress now
Development

No branches or pull requests