Forum Discussion
Appended queries optimization
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.
- OSS7 years agoHelper III
Dear Greg. Thank you for response.
I have 12 separate queries (12 excel uploads). I have appended them and get 1 one Yearly sales table with 12 amount columns. Then I have created new 'Grand Total' column and add up all these 12 monthes sales. Now I want to pivot my results related to this new 'Grand Total' column. Your solutions is good, but it works for native query columns. The columns which are added out of query editor will not be found in query ediyor window.
- Greg_Deckler7 years agoCommunity Champion
Perhaps this DAX Unpivot Quick Measure:
https://community.powerbi.com/t5/Quick-Measures-Gallery/DAX-Unpivot/m-p/574832
If not, please provide very simple sample/example data and expected result. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- OSS7 years agoHelper III
Since my queries contain huge amount of data I try to create sample of the data in the excel.
I wonder, if merge function will be solution for me?
- tex6287 years agoCommunity Champion
Add a date column to each query with the appropriate month and make sure that the other columns all have the same name ( Amount, Product, Customer). Then append the 12 queries and you should be able to show the values by dimension.
- OSS7 years agoHelper III
Actually I don't need any date for my queries. Before uploading I correct all my tables and make all columns the same name.