cancel
Showing results for 
Search instead for 
Did you mean: 
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
Frequent Visitor

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 III
Super User III

@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!






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  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?






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.






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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors