Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

In Power Query Editor, how to add columns which need sum and group by?

Hi all,

 

I'm new to Power BI, so I really hope that you can tell me the solution step by step.

 

I have data like below :

KeyTypeAmount1Amount2
1A6010
1B3020
2A4020
2B7050
3A10090

 

Acutally I have a lot of "amount", "amount1,2,3,4,...", and in this example, I want to add 2 columns in Power Query Editor, like below:

KeyTypeAmount1Amount2New Amount1New Amount2
1A60109030
1B30209030
2A402011070
2B705011070
3A1009010090

 

Logic is, sum(amount1) group by key and type

 

I'm not familiar with the M Query, so I don't know how to add these 2 columns, please help!

 

Thanks in advanced.

 

Aiolos Zhao

5 Replies