Forum Discussion
Modify query after datasource is created
Hello
Is there a way to modify the datasource from which data has been loaded to PowerBI?
Initially when I have created a report, I used Import query option to retrieve all the records, with all the columns in a SQL Table. The table has more than 65 M records and now when I try to refresh the query, it fails with memory not available erorrs.
What I'm trying do it to limit to only the columns that I need to get the report functional. so I tried, to add the query wiht the where clause
Edit Queries -> Data Source Settings
However the query window is greyed out. Is ther a way out without building a new report altogather?
Thanks
8 Replies
- Phil_SeamarkMicrosoft Employee
Hi Ash1
If you can get into the Query Editor try clicking this button
Hopefully it brings up the query window where you can replace your query with one that contains just the columns you need and perhaps a WHERE clause that restricts your rows to exactly what you need.
- Ash1Frequent Visitor
Thanks for the reply,
It allows me to update the qeury, but I'm running into issues when I'm trying to apply the changes
Error: The key didn't match any rows in the table
Details:
Key= Record
Table = Table
~Ashwin
- Phil_SeamarkMicrosoft Employee
Oh ok, so maybe edit the query to limit the rows and use the Query Editor to remove the columns.
Can you revert the query back to what it was but just put a TOP 100 in the SELECT ?