Forum Discussion

OSS's avatar
OSS
Helper III
7 years ago

Appended queries optimization

Dear all

I have 12 sales tables. (Sales by monthes)

Columns are: customer id, product id and amount.

 

I append all 12 tables (queries) and get final result with more than 5 million rows. Could you please help me to pivot all of this data. I would like to sum amounts for the same customer id and product id.

13 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Are you saying that you want to pre-aggregate the data in Power Query before importing into your data model? Right click customer id in the Query Editor and choose Group By and then choose Advanced to group by two or more columns.