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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
micha_a
Frequent Visitor

Measure If statement and HasOneValue; enable button based on values

I have the following data: 1. Themathic area, once an area is selected, the user has to choose from the Questions table the items that they wish to see more detail for. Once the item is selected the button next to it (see more details ) is enabled and they can drill through another page to see more details about that specific question.

 

The questions are categorised under field Drillthrough in  Type 1 and Type 2 and Trend and each button takes you to that Type 1/2/Trend page.

 

If a question of Type 1 is selected, I want the button type 1 to be enabled, if a type 2 question is slected I want only Type 2 button to be enabled.

 

micha_a_2-1674049231056.png

I created a measure for the button to display the value of the item selected, but both buttons are now enabled wheres I want only button Type 1 to be enabled.

 

micha_a_3-1674049537749.png

 

My measure:

Selected Navigation = IF(HASONEFILTER(Questions[Navigation]), IFERROR(VALUES(Questions[Navigation]),VALUES(Questions[Navigation])),IF(HASONEFILTER(Questions[Navigation]),  IFERROR(VALUES(Questions[Navigation]),VALUES( Questions[Navigation])), "Please Select a Response"))
 
This measure is used on the Conditional Formatting of the text of the button
 
Is there a way to enable only that button if I add multiple If statments? Or how to hide Button Type 2 when Type 1 question is selected?
 
I hope this makes sense.

 

2 REPLIES 2
amitchandak
Super User
Super User

@micha_a , You can have one button and conditional drill through?

 

refer: https://www.youtube.com/watch?v=4Qy-bksqExI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

This is not helping me, but thanks!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.