Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
cbschley
Helper III
Helper III

Dynamic Web URL in Button Action?

Hello - I am trying to build a dynamic web URL measure to use in a button action. This would then allow the user to click on the button, and it would take them to a certain paginated report depending on the environment they are in. 

When I build this measure, Power BI does not let me use it in the conditional formatting option in Power BI Desktop. I already have the environment piece configured, but I can't understand why it won't let me select this measure from the conditional formatting area. When I select my new measure to place in this area, it goes to blank, meaning it won't let me use it.

 

 

 

Dynamic_Button_Link = 

SWITCH(TRUE()
,Environment_Selection[Environment_Selection] = "Dev", "https://app.powerbi.com/groups/bb8da941-c096-4913-b68c-a0a72b192376/rdlreports/244915da-a877-4ba7-b7ca-0e650d3c99fd?experience=power-bi&clientSideAuth=0"
,Environment_Selection[Environment_Selection] = "Test", "https://app.powerbi.com/groups/10d6094c-b41e-415e-8873-e8287a133e23/rdlreports/58e4a8d8-d2c4-44c5-bbe0-e04413420edb?experience=power-bi&clientSideAuth=0"
,Environment_Selection[Environment_Selection] = "Prod", "https://app.powerbi.com/groups/e9ddc1dd-945b-4414-a82b-42b25730eb50/rdlreports/e88de90d-59a7-4e4f-9862-00b1fdf6ceab?experience=power-bi&clientSideAuth=0"
)​

 

 

 

cbschley_0-1723216656540.png

 

 

1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Have you set the measure to be a URL?

SamWiseOwl_0-1723218899020.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

4 REPLIES 4
SamWiseOwl
Super User
Super User

When I copied your code both times it copied something at the end of the code.

I had to hit the delete key after the final bracket to remove it.

Not sure if that is related!

SamWiseOwl_1-1723219172565.png

 

once I hit the delete key after the final bracket

SamWiseOwl_2-1723219200117.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

That might be a weird formatting thing with the forums. Another comment suggested changing the data category to URL, and that worked! 

SamWiseOwl
Super User
Super User

Have you set the measure to be a URL?

SamWiseOwl_0-1723218899020.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

This worked - thank you! I did not know I had to set the data category in order for this to work.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.