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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
GabrielSDinamic
New Member

Show button if I select a value in table

I have a table with multiple entries, and a button that if I select a value from the table, the link from the button changes to a specific URL, but I want the button to be hide if nothing is selected in the table. Any ideas?

1 ACCEPTED SOLUTION
v-jialongy-msft
Community Support
Community Support

Hi @GabrielSDinamic 

 

Please try the following steps:

1. Create a metric that outputs a different URL depending on the value selected.

ButtonLink = IF(ISBLANK(SELECTEDVALUE('Table'[value])), "", "https://www.google.com")

 

2.Apply this measure to the text of this button.

vjialongymsft_0-1715934922907.pngvjialongymsft_1-1715934930801.png

 

 

This is the result you want:

vjialongymsft_2-1715934969392.pngvjialongymsft_3-1715934976877.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

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

View solution in original post

2 REPLIES 2
v-jialongy-msft
Community Support
Community Support

Hi @GabrielSDinamic 

 

Please try the following steps:

1. Create a metric that outputs a different URL depending on the value selected.

ButtonLink = IF(ISBLANK(SELECTEDVALUE('Table'[value])), "", "https://www.google.com")

 

2.Apply this measure to the text of this button.

vjialongymsft_0-1715934922907.pngvjialongymsft_1-1715934930801.png

 

 

This is the result you want:

vjialongymsft_2-1715934969392.pngvjialongymsft_3-1715934976877.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

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

vicky_
Super User
Super User

There's a few ways - the first is to format the button to either be the same colour as the background if nothing is selected, or maybe show an error message. 

So in the end, you'd have something like:
IF(HASONEVALUE(Table[Field from your Table]), 

    // your URL here i.e something has been selected  in the table,

    // BLANK()

)

You can then format your button based on if the URL is blank or not.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.