Forum Discussion

dlogan's avatar
dlogan
Helper I
2 years ago
Solved

Hide visual but keep selection from hidden visual

I have 3 visuals laid on top of each other and want to show only 1 visual at a time. The mechanics of that is working using bookmarks and buttons. My wish was to have the user make a selection in the first visual, then click on a button to see details on the other 2 visuals. These details would be related to the selection made in the first visual. However, I have discovered that hiding a visual gives you the same results as deselecting said visual.

 

In the images below I have resized the visuals to show what happens when the first visual is hidden. Any ideas on how else I might accomplish this would be greatly appreciated. Thanks.

 

 

 

15 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    dlogan 

    im not sure is this would help , 

    but you can do something like this : 

    in this image i have 2 visuals. 

    if no selection is done on visual 1 , the second visual will not show any data, 

    but , as soon as you select any row from the first visual , visual 2 start showing the data related to the selection

     

     

    if this is something you want, you can achieve it by creating a measure that will check if you have a filter on the columns of the first visual . 

     

     

    then this measure you will put it in the filter pane - on visual level for the other visuals, 

     

    measure =  1 

     

     

    let me know if this works for you 

    • dlogan's avatar
      dlogan
      Helper I

      Thank you for the quick reply. This sounds very interesting. I am new to Power BI and know very little about DAX. I will try this later tonight and let you know if I have questions. Thank you.

    • dlogan's avatar
      dlogan
      Helper I

      Quick question: What are the keystroke(s) to start a new line in DAX? It sure makes it easier to read.

    • dlogan's avatar
      dlogan
      Helper I

      This is not working. As soon as the first visual is changed to hidden, the second visual resets to show all records. Test it on the example you showed.

       

      This is when the first visual is not hidden and has a selection

       

       

      This is after the first visual is hidden. The second visual changes and shows all records.

       

       

      • Daniel29195's avatar
        Daniel29195
        Community Champion

        im assuming that your  bookmarks are saving the data ?  if so , then the filter that you have added in the filter pane for the visual  will reset because the bookmark have been created before adding this measure in the filter pane 

        so you need to recreate the bookmarks taking into consideration the measure in the filter pane, or if you dont need to save the state of the data, just ignore saving the data in the bookmarks . 

         

        unselect data and update the the bookmark . 

         

        let me know if the problem persist. 

        dlogan