Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I want to create a power bi template that includes all the tables of a MySQL DB for one of my clients and save it as a template. All my clients have exactly the same tables and I collect the same exact data, but i have different DB names for each one of them.
What I need is when I open the template to give the DB name of the client I want to create a report for and update all the tables with the correct DB name.
So far, I have to edit the schema of each table and change the DB name manually. If there is a way to automate that it will save lots of time.
Thank you in advance,
George
Solved! Go to Solution.
@Anonymous,
You can create a database name parameter in your PBIX file following the instructions in this blog, then add a new blank query and paste the code below to the Advanced Editor of the blank query.
let Source = MySQL.Database("Server", ""&dbname&"", [ReturnSingleDatabase=true]), TTable = Source{[Schema=""&dbname&"",Item="TableName"]}[Data] in TTable
After that, create Power BI template following the guide in the blog below.
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
Regards,
Lydia
I have found the solution. I will provide information shortly.
@Anonymous,
You can create a database name parameter in your PBIX file following the instructions in this blog, then add a new blank query and paste the code below to the Advanced Editor of the blank query.
let Source = MySQL.Database("Server", ""&dbname&"", [ReturnSingleDatabase=true]), TTable = Source{[Schema=""&dbname&"",Item="TableName"]}[Data] in TTable
After that, create Power BI template following the guide in the blog below.
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
Regards,
Lydia
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |