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,
I have created report which is connected to dev environment but now I want to point the report to test environment. Both dev and test are present on same server but in different schemas. How I can dynamically change the report between dev and test environments? I read using parameters we can acheive this so I have created a parameter using List of Values and given the schema names in the list of values. But when I select the Parameter values, the data is not changing in the report even though the data is different in both the environments. Can you please help how I can acheive this?
Please let me know if I am not clear.
Thank you.
hi, @Anonymous
You may try to use Parameters in Power BI.
and here are some blogs for you to refer to:
https://www.mssqltips.com/sqlservertip/4475/using-parameters-in-power-bi/
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
hope these can help you.
Best Regards,
Lin
Thanks for sharing the documents, actually I went through them before posting my question. All those documents has steps to pass parameters when source is SQL Server database. It is straight forward when the source is SQL Server as it has option to select parameter as source. But my source is Impala and it uses ODBC connectivity. Due to this I am finding difficult to pass the parameter while changing to different sources. Please let me know if I am not clear.
Hi @Anonymous - did you update the M code and link it to the parameter ?
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Hi @LivioLanzo
No I havent. I am bit confused how to edit the M code and to link the parameter. Below is the M code for the table:
let
Source = Odbc.DataSource("dsn=Dev", [HierarchicalNavigation=true]),
IMPALA_Database = Source{[Name="IMPALA",Kind="Database"]}[Data],
emp_Schema = IMPALA_Database{[Name="emp",Kind="Schema"]}[Data],
employee_Table = emp_Schema{[Name="employee",Kind="Table"]}[Data]
in
employee_Table
Instead of using "emp" you'd use the parameter name
let
Source = Odbc.DataSource("dsn=Dev", [HierarchicalNavigation=true]),
IMPALA_Database = Source{[Name="IMPALA",Kind="Database"]}[Data],
emp_Schema = IMPALA_Database{[Name=parameterName,Kind="Schema"]}[Data],
employee_Table = emp_Schema{[Name="employee",Kind="Table"]}[Data]
in
employee_Table
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
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 |
---|---|
107 | |
98 | |
78 | |
65 | |
60 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |