Aggregate sum columns to list of records for charts

Hi,

I have aggregate from orders which have received, so each order is on a single row and products which are included on that order, has its own column.

What I need to do, is first sum each product column, to see how many each product has been sold, so basically output is then listed where the label is product number and value is sum how many products have been ordered 

How I can convert this to a list which has a label and count to use it on the chart? So example first item would be Product:PB3TUNNELTULIPsum and Count:(Value of PBTUNNELTULIPsum)

So basically I want to show a chart where each product has its own bar and bar value would be the sum of all orders for each product.

The format is a bit challenging but that is because orders will be imported from CSV.


Thanks for help

Hi Markus,

is better just do another aggregate and get the information like you need. Products with or without orders. GroupBy Product name and count the orderId.

Regards,

Marcelo

Hi,


Yes I agree with the above comment you just need to group by-product and apply an aggregate function.

Thanks!

Marcelo Ferreira wrote:

Hi Markus,

is better just do another aggregate and get the information like you need. Products with or without orders. GroupBy Product name and count the orderId.

Regards,

Marcelo

Hi Marcelo,

Thanks for the prompt reply!

Problem is, that I receive each order(s) on csv file, and each order contain full order in each row, which contains person details, addresses, and, products. So if I would separate table for products and orders etc, this would be much easier to handle, but as I receive CSV, I'll upload it, and then I have one order which can contain multiple products


Br.Markus


Each PGH column is a product?

When you upload that csv file you should normalize your data in a way that makes it easy to use.

Regards,

Marcelo