Google-sheets – Different bar types based on column value

google sheetsgoogle-sheets-charts

Instead of having one column for each new "type" below, is there any way to achieve the same result using the non highlighted cells in the image below?

To elaborate, I would like different bar types based on the "type" column, rather than adding a new column for each type.

Is this possible?

different bar types

Best Answer

You can get selected range, using this formula:

=query({A1:C5},"select Col1, sum(Col3) group by Col1 pivot Col2",1)

The new range can be used to make a chart.