Forum Discussion

Millar's avatar
Millar
Frequent Visitor
2 years ago
Solved

Powerbi

how to hide table chart when nothing selected in stacked bar chart

  • Hi Millar 
    You can create a flag measure that checks if some value of the graph is selected. 
    For example, if my graph rankin some measure by-products that will look like this:

    Now you can use this test measure to filter a table : (note that you have to have different columns at the graph and table)

     

    To make the user's life easier, you can use conditional formatting on the title that will guide him to make a selection from the graph if the table is blank.
    You can create a measure for the title of the table like :

    and to use conditional formatting by value to put it :

    and to make it red use conditional formatting of the title color

    pbix is attached

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

5 Replies

  • Hi Millar 
    You can create a flag measure that checks if some value of the graph is selected. 
    For example, if my graph rankin some measure by-products that will look like this:

    Now you can use this test measure to filter a table : (note that you have to have different columns at the graph and table)

     

    To make the user's life easier, you can use conditional formatting on the title that will guide him to make a selection from the graph if the table is blank.
    You can create a measure for the title of the table like :

    and to use conditional formatting by value to put it :

    and to make it red use conditional formatting of the title color

    pbix is attached

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

    • Millar's avatar
      Millar
      Frequent Visitor

      Here my solution based on your inputs

       

      scenario :- when nothing is selected in the staked bar chart - another visual should be completely hidden. when the staked bar is selected it should show another visual detail

       

      PBI-Dynamic way of hide another table chart visual and its value ( without using bookmark and buttons

      ===================================================

       

      Select the visual which you want to hide then go to filters-> drag measure ->Hide Table = int(ISFILTERED('DMADP OPEM_ADP_DATE_D'[Year-Month]))-> Show item when the values is 1

       

      Select visual where you want to hide Title & border

       

      Change Title color as" White"

       

      Chnage Border Color as " White"

       

      Then go general -> Title -> Text(FX) and select measure Hide Title = if([Hide Table]=0," ","Open in JIRA")

      Thanks a lot for your support Ritaf1983.. Much appreciated 🙌🙌🙌

  • Millar's avatar
    Millar
    Frequent Visitor

    Thanks but I want it for stacked bar chart x axis has month-year(like 12-2023) y axis has count of(sales id) if user clicks bar then in another chart it show sales id details (like row wise 1,2,3)

    • Ritaf1983's avatar
      Ritaf1983
      Super User

      Please share a link to pbix with example + show the desired result