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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors