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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DanielLinda
Helper IV
Helper IV

Disable / Enable Button

Hi All,

 

I made button to go other page, but I want to make button enabled only when user select one value from slicer.

 

Is there any way to control button to disable / enable?

 

Thanks in advance.

12 REPLIES 12
Keith_Fernandes
Advocate II
Advocate II

Hi 

I may be very late to this but I have a solution if you are still looking for one.

 

For example, if your slicer is built on country name-

Keith_Fernandes_0-1619948713502.png

And I have buttons to navigate to the pages-

Keith_Fernandes_1-1619948764434.png

Next as per your requirement, I have created a measure in the dim_product table as below-

logic = if(ISCROSSFILTERED(dim_country[country_name]),"Country Analysis","")
 
Next I go to the button and assign this measure to the action setting under page navigation.
Keith_Fernandes_2-1619948885600.png

 

You are good to go.

parry2k
Super User
Super User

@DanielLinda check this post that talks about it. In this post, it shows how to enable/disable button

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k  Do you think I can do the same thing with navigation button?

 

I followed the post, created the measure and it works great but when it button of type navigation I dont manage to disable it when the conditions are not met. the button dosent do anything but its not disabled

Thanks @parry2k,

It looks great, I didn't realize the function in Power BI desktop.

Is it possible only from Power BI service?

@DanielLinda not sure what you mean, only from Power BI Service?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Sorry, can I use the feature in the Power BI Desktop as well?

 

As I know some of the features are not usable in Power BI Desktop.

@DanielLinda it will work, did you actually tried it or asking questions. Everything is there, well documented for you to test. You can ask as many questions as you want but you have to test before asking the next questions. Just feedback.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

Yup, sure I will.

I'll follow your suggestion.

 

Thanks 🙂

I'm trying what you infromed, but I cannot use "SELECTEDVALUE" function and the error shows like below.

I cannot understand why the function cannot be found in my environment since I'm just following as same as the document.

image.png

Please give me any solution about it.

I succeeded to use HASONEVALUE function rather than SELECTEDVALUE.

 

However, the disabled drill through button just control text not action.

Is there no option to make user cannot click button?

 

Thanks so much.

Hi @DanielLinda ,

I'm not clear about your required? Do you want to all of the report consumers can't click this button? If yes, then this button is meaningless...

Best Regards

Rena

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

No, I want to control the button by selected value from slicer.

If user doesn't select any value from slicer, the button should be disabled(even though user click the button, any action should not work.).

When user select value from slicer, user can go other page by clicking the button.

 

Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors