Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Default and Disabled Buttons

Hello!  I have two buttons and I want to make them a bit more interactive.

My two buttons are "Show in $" and "Show in %"

I want the show in $ to be default and active - but when I click on show in %, I want that new button to be active and the show in $ to be disabled.

 

Not sure how to do this!  

  • Hi, Anonymous 

    According to your description and requirement, I created two measures and apply a filter to this page to achieve the similar output you wanted, you can take a look:

    First I created a table for the filter:

     

    Then I created two measures:

    Color1 =
    
    IF(SELECTEDVALUE('Filter'[Display format])="$","Black","White")
    Color2 =
    
    IF(SELECTEDVALUE('Filter'[Display format])="%","Black","White")

    Then I created two bookmarks and two tables and set conditional format like this:

     

    Then set like this, and you can get what you want.

     

    For more detail, you can download my test pbix file here

    Thank you very much!

     

    Best Regards,

    Community Support Team _Robert Qin

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

2 Replies

  • Hi, Anonymous 
    Please correct me if I wrongly understood your question.

    I assume, when you click % -> $ button's color is changed to light color to show it is not-selected.

    I think you can try to use these buttons by combining them with the bookmark function.

    if it is OK with you, please share a sample pbix file, then I can try to come up with a desirable solution.

     

    thank you.

     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.

  • v-robertq-msft's avatar
    v-robertq-msft
    Community Support

    Hi, Anonymous 

    According to your description and requirement, I created two measures and apply a filter to this page to achieve the similar output you wanted, you can take a look:

    First I created a table for the filter:

     

    Then I created two measures:

    Color1 =
    
    IF(SELECTEDVALUE('Filter'[Display format])="$","Black","White")
    Color2 =
    
    IF(SELECTEDVALUE('Filter'[Display format])="%","Black","White")

    Then I created two bookmarks and two tables and set conditional format like this:

     

    Then set like this, and you can get what you want.

     

    For more detail, you can download my test pbix file here

    Thank you very much!

     

    Best Regards,

    Community Support Team _Robert Qin

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