Search code examples
google-sheetschartspivotgoogle-query-languagestacked-bar-chart

Stacked chart with multiple categories stored in a SINGLE column – Google Sheets


I need to create a stacked column chart with Date aggregated on X-axis, and the bars with multiple (dynamically formed?) Category series.

All of the examples out there demonstrate how to create the stacked graphs with the separate columns for each category. Is it possible to achieve the goal without the redundancy of creating another table with categories inlined into dozens of columns? I would really love to avoid that.

I would appreciate the help

Table in maintenance


Solution

  • try:

    =QUERY(A2:C, "select A,sum(B) where A is not null group by A pivot C")
    

    enter image description here