Forum Discussion
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.
dlogan in my testing, it works the same - when you hide a visual, it no longer filters the data on the report UNLESS that visual is a slicer.
I would suggest looking into using 'drillthough' functionality and different pages, rather than one page to rule them all.
https://excelwithallison.blogspot.com/2020/12/seventh-day-of-christmas-conditional.html
15 Replies
- Daniel29195Community Champion
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
- dloganHelper 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.
- dloganHelper I
Quick question: What are the keystroke(s) to start a new line in DAX? It sure makes it easier to read.
- Daniel29195Community Champion
shift + enter
- dloganHelper 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.
- Daniel29195Community 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.
- Daniel29195Community Champion
these are some helpful links
https://dax.guide/isfiltered/
https://dax.guide/iscrossfiltered/https://www.youtube.com/watch?v=iS6DdLnB0WQ
if you have any question, im more than happy to help you
- AllisonKennedyCommunity Champion
dlogan in my testing, it works the same - when you hide a visual, it no longer filters the data on the report UNLESS that visual is a slicer.
I would suggest looking into using 'drillthough' functionality and different pages, rather than one page to rule them all.
https://excelwithallison.blogspot.com/2020/12/seventh-day-of-christmas-conditional.html