Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All
2 Questions:
1. I have an SQL query that starts with DROP Table when importing it via Power Query i get an error due to the drop table.
2. I have 3 SQL queries that im importing via Power query, on a weekly basis i would usually update the week (ie, 01,02,03) in the 3 queries. Is there a way in Power query that i can do this?
Thanks for the feedback in advance
Solved! Go to Solution.
Hi @Keithr197
For question 1, it is not suggested to have DROP Table statement in the SQL query. When we import data via Power Query, we are usually to select data from the database rather than drop a table there. Please remove the DROP Table statement from the SQL query.
For question 2, you can use the query parameter. Here is a video tutorial for your reference: Pass parameter to SQL Queries statement using Power BI | Microsoft Learn
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Hi @Keithr197
For question 1, it is not suggested to have DROP Table statement in the SQL query. When we import data via Power Query, we are usually to select data from the database rather than drop a table there. Please remove the DROP Table statement from the SQL query.
For question 2, you can use the query parameter. Here is a video tutorial for your reference: Pass parameter to SQL Queries statement using Power BI | Microsoft Learn
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Hi @Keithr197 ,
You could look at using parameters as an option for #2
https://learn.microsoft.com/en-us/power-query/power-query-query-parameters
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |