Grafana Bar Chart: visualize sum of entries per product type for each month

I am trying to visualize following data using the bar chart in Grafana. My datasource is ElasticSearch which gets logmessages like this:

I know want to group these entries by product type and get the sum of all entries for each product type per month. The result should looks like this:
image

I already managed to get the sum of all entries per product type. (metric is set to count and it is grouped by product type)

But I do not know how to get the sum per product type for each month. Any ideas on how to achieve this?