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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors