Google-sheets – Bar Chart Merge 2 columns in a single bar

google sheetsgoogle-sheets-charts

I have the following table, I want to generate a bar chart where for each year I can see a single bar, including both Cash and Credit.

table

Today I only see this:

chart

Link here

Best Answer

  • you can either tick Aggregate column A:

    enter image description here


  • or use QUERY to group years and output table directly from QUERY:

    =QUERY({A2:C}, 
     "select Col1, sum(Col3) 
      where Col1 is not null 
      group by Col1 
      label sum(Col3)''", 0)

    enter image description here


  • or add the 2nd series and aggregate column A:

    0