Forum Discussion
Byzbkr
4 years agoFrequent Visitor
Changing the datasource
Hello, I have more than one database in my SQL server. In addition, the tables in the databases are same. I created a report with a specific database. However, I want to give the user the option to ...
lbendlin
4 years agoSuper User
- make sure the data source is in direct query mode
- enable the preview feature "dynamic M query parameters
- learn about how to set up parameters and tie them to filters
- modify your M to use custom SQL and include the parameter
Once again - think long and hard before implementing this.
Byzbkr
4 years agoFrequent Visitor
Thanks for your help. But main problem I can't find a way to modify M query. Is there a similar M query you can share?
- lbendlin4 years agoSuper User
If you have Power BI Desktop then you have access to the Power Query part as well. Click this icon on the top menu
Frankly I would not do something like what you are planning to do (for the reasons I mentioned earlier) and I wouldn't want to give you bad advice by sharing the code.