Hello,
I’m a new user of KNIME and I need a help to calculate an average.
Indeed, I have a data with sales and price for each city and I would like to group the citys by country and calculate the average of the price.
Country | Product | City | Sales | Price |
---|---|---|---|---|
Allemage | D | Berlin | 85 | 635 |
US | A | Californie | 147 | 1006 |
UK | B | Fulham | 64 | 704 |
UK | A | Liverpool | 28 | 1006 |
UK | A | London | 360 | 1006 |
France | C | Lyon | 75 | 314 |
Espagne | B | Madrid | 25 | 704 |
UK | E | Manchester | 40 | 1153 |
France | E | Marseille | 118 | 1153 |
Italy | E | Milano | 126 | 1153 |
Allemage | A | Munich | 59 | 1006 |
UK | A | Newcastle | 73 | 1006 |
US | A | NY | 133 | 1006 |
France | B | Paris | 47 | 704 |
Italy | A | Rome | 114 | 1006 |
Italy | D | Torino | 34 | 635 |
UK | E | Tottenham | 129 | 1153 |
When i calculate the weighted average for country, I should get this result
Country | Average price |
---|---|
UK | 1014 |
US | 1006 |
Espagne | 704 |
France | 803 |
Allemage | 787 |
Italy | 1028 |
But with a group by node, the sales are not considerated in the aggregation of the average.