I have a data table about a company having different divions. The divisions can order products to use them and they can order the same kind of things sometimes if they need them. I'd like to compare their orders from 2015 with the ones from 2016. So I need two levels of groups. The main should be divisions and under it should be product_names wich summarizes the amount of a certain product ordered in 2015 and then in 2016.
The data table is something like this:
<tbody>
</tbody>
Is it possible to do what I want here in an easy way like subtotal? I'm only interested in a simple solution because I can summarize the data on my own in a difficult way using multiple functions, it's not what I'd like to do. I'd like to find a simpler way to do it.
The data table is something like this:
division | product_name | amount ordered_2015 | amount_ordered_2016 |
A | a | 1 | 2 |
B | b | 10 | 5 |
C | c | 2 | 6 |
A | d | 0 | 3 |
C | a | 0 | 4 |
D | b | 0 | 9 |
A | a | 4 | 1 |
B | c | 5 | 2 |
B | c | 6 | 3 |
<tbody>
</tbody>
Is it possible to do what I want here in an easy way like subtotal? I'm only interested in a simple solution because I can summarize the data on my own in a difficult way using multiple functions, it's not what I'd like to do. I'd like to find a simpler way to do it.