Forum Discussion
Troubles with grouping in Power Query
- 1 year ago
You have 2 options then I reckon. If it's a fabric pipeline, Spark based pipeline or an Azure Data Factory pipeline, you can add transformation steps to do the aggregations and then the Power Query engine won't need to spend time doing that effort.
Alternatively, the better option in my opinion, would be to make a view based on that table, within the SQL Database that you're querying. You can do things like grouping and roll up within SQL statements. If you're not the best at SQL then maybe use ChatGPT to try and convert your m code into SQL code, which you can use to make the view.
Hi,
Thanks for the solution pbiuseruk and BabyYoda offered, and i want to offer some more information for user to refer to.
hello MattMcMillin_71 , bas on your description, you'd better not use the calculated column to group, it will affect the performance.You can refer to the following solutions:
1.as pbiuseruk and BabyYoda mentioned, you can consider to group on data source.
2.Simplify your data types and only load important columns into Power BI, you can refer to the following link.
Optimization guide for Power BI - Power BI | Microsoft Learn
3.If your datasource supports incremental refresh, you can consider to use incremental refresh to process the data instead of the whole data, it can improve the performance, you can refer to the following link about incremental refresh.
Incremental refresh for semantic models in Power BI - Power BI | Microsoft Learn
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.