I am not sure what output you are looking for.
There are many ways to do it. You can do it by creating a measure in Power BI or in PowerPivot or just using Powerquery - below is an example.
PowerPivot and PowerQuery can both put the output into a pivot table in Excel if that's something you prefer.
Pick up city Q1 Q2 X Amount1 Amount 2 Y ... ...