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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
crobinson661
Frequent Visitor

Make Web URL button disappear if value is blank

 

I have a page with various URL buttons and the backend data is only populated where there is a URL to navigate to, otherwise it's blank. There is a table on the page that populates various info about a record into a multirow card when clicked, and I want to make the button not visible if the data for that item's URL is blank and clickable if it is not blank. 

 

I'm using a custom Icon for the button. 


I wasnt sure if I should just remove the icon if the button is disabled? But I wasn't sure if no data makes a web URL button "disabled" in Power BI. 

Thanks for any help!

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @crobinson661 
There is no option to make something "disabled" but you can use conditional formatting to make the button invisible / give it some text like " note the link is unavailable".

For the first option, you can use flag measure like :

test button = if(max('Table'[link])="",1,0)
and then modify the color of the text / other elements of a button based on this measure :
Ritaf1983_0-1702099504812.png

+ the same on the border if you have one

the result :

Ritaf1983_1-1702099641296.png

Message option:

create a measure like :

test with message = if(max('Table'[link])="", "Note the link is unvailible", "Press to the link")

using conditional formatting "take it " to the button

Ritaf1983_2-1702099763629.png

and using color conditional formatting to make it red 

Ritaf1983_3-1702099829757.png

result

Ritaf1983_4-1702099955729.png

PBIX is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @crobinson661 
There is no option to make something "disabled" but you can use conditional formatting to make the button invisible / give it some text like " note the link is unavailable".

For the first option, you can use flag measure like :

test button = if(max('Table'[link])="",1,0)
and then modify the color of the text / other elements of a button based on this measure :
Ritaf1983_0-1702099504812.png

+ the same on the border if you have one

the result :

Ritaf1983_1-1702099641296.png

Message option:

create a measure like :

test with message = if(max('Table'[link])="", "Note the link is unvailible", "Press to the link")

using conditional formatting "take it " to the button

Ritaf1983_2-1702099763629.png

and using color conditional formatting to make it red 

Ritaf1983_3-1702099829757.png

result

Ritaf1983_4-1702099955729.png

PBIX is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.