Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Modify Refresh SQL

Hi All,

I need to modify the import statement from getData. I want to cut down the size of the data by eliminating some columns that will not be used. Since the source was Azure SQL Server (using import) there must be SQL somewhere I can modify. Is that possible?

 

Thanks!

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous,

 

If you use Power Query (M-Code), the query folding generates the SQL statement.

Just add a "Choose Columns" step.

 

Take a look at this.

https://www.mssqltips.com/sqlservertip/4563/power-bi-native-query-and-query-folding/

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

2 REPLIES 2
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous,

 

If you use Power Query (M-Code), the query folding generates the SQL statement.

Just add a "Choose Columns" step.

 

Take a look at this.

https://www.mssqltips.com/sqlservertip/4563/power-bi-native-query-and-query-folding/

 

Regards,

Marcus

Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


az38
Community Champion
Community Champion

Hi @Anonymous 

there are two option:

1. Power Query editor. pick your data source and change Source step at the right pane

2. Home ribbon - Edit queries - Data Source Settings (but in most of cases you will be still needed to go to the power query editor and edit data source if you wat to delete columns)

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.