Forum Discussion
Dynamically change the URL link for different Environment in Power BI
- Anonymous2 years ago
Hi patilpoonam21 ,
Based on your description and the example data provided, I think you can dynamically change the URL links for different environments (development, test, and production) in Power BI by setting parameters.
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:1.Open power query and create a parameter and enter the values you want for your test environment or other dynamically changing values
2.Right click the parameter and choose enable load to apply parameter
3.Create a measure
PBICustLink = CONCATENATE( SELECTEDVALUE('Environment URL'[Environment URL]), "/reports/&filter=OpenInv%2F" & SELECTEDVALUE('Table'[Customer]) & " eq " & "%" & 27 )4.Final output
Replace any value in the measure as you see fit.
You can refer to these documents to learn more about parameter settings:
Deep Dive into Query Parameters and Power BI Templates | Microsoft Power BI Blog | Microsoft Power BI
Use parameters to visualize variables - Power BI | Microsoft LearnBest regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
As you specified, to change the parameter dynamically I need to change the URL in Cloud server under parameter setting so I changed it customer report UAT environment URL.
Also, in Power BI desktop, I changed the measure as below:
Still it is redirecting to the Dev URL. Is there anything else I need to change?
Thanks,
Rinku
Sorry for the confusion. I got an error while refreshing the dashboard so the changes couldn't reflect.
Thank you again for the detailed instructions.