Forum Discussion
andreazambon
Helper V
3 years agoCreate powerBI columns with SQL queries
Hello there. In PowerQuery I use to build columns with M code and, if I need it, merging tables. My tables usually are excel tables. This way is quite a trash. I would like to be more efficient...
Anonymous
2 years agoNot applicable
Hi andreazambon ,
In Power Query, only M code can be used.
However, you can use SQL statements to pre-filter when connecting to SQL Server.
Tutorial: Connect to on-premises data in SQL Server - Power BI | Microsoft Learn
Some ways about filtering in Power Query for your reference:
Filter data (Power Query) - Microsoft Support
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.