Forum Discussion
Changing datasource in Direct query mode
Hi
I am now authoring Power Bi report connecting to SQL Azure database using direct query. We frequently create new databases, so I should change data source whenever a new database is created. I use File - Options and settings - Data source settings to change the data source. It generally works fine, but sometimes it shows below message, even though all queries are coming from the same data source :
"Connecgin to tables from more than one database is not supported in DirectQuery mode."
I am suspecting duplicated queries from other queries cause this issue, but not sure... If you have any idea, please let me know.
Thanks.
6 Replies
- Eric_ZhangMicrosoft Employee
I don't see that error by changing the datasource that way in your post. Please check your queries one by obe in "Edit Queries"->"Adavanced Editor" to ensure that only one database is invloved. By the way, you may consider to use Parameters instead of that way.
- keondoparkRegular Visitor
Hi Eric
It generally works okay, but sometimes the error occurs and I do not know why.
Maybe I should change the way I use datasource as you directed - using Parameters.
- JakobGsvendsenFrequent Visitor
I have same issue... I managed to make it go away by removing the one parameter I had on the report
(it was called username, with value username() )
luckily i dont need it right now.
but It does seem there is a bug when checking multiple sources.. as it shoulnd fail on a parameter value
- krousseauRegular Visitor
I have same issue, it refreshes in the preview ok but when apply and close i get error "Connectin got tables from more than one database isn't supported in DirectQuery Mode"
- krousseauRegular Visitor
I have same issue, it refreshes in the preview ok but when apply and close i get error "Connectin got tables from more than one database isn't supported in DirectQuery Mode"
- UOLandrewdaleResolver I
You have replied to a very old topic. There is a new topic about this issues, which seems to say that it is a bug in the Jan 2018 release (version 2.54.4970.761).
updating to the 19th Jan release (version 2.54.4970.961 ) appears to fix it according to this post (have not tried it myself)