Forum Discussion
Table Visual - Prevent unfiltering on row click
Of course this was not solved. Quite anoying. Using CTRL key is not a solution as users don't know this and this is actually allowing users to select multiple records in the table. Replacing the table with a slicer is not a solution as users cant see other useful attributes. If clicking on a table should reset the abobve selections as it is happening now, then the table visual should include an option to not reset the selection from the other visuals, while an user is clicking on the table. Otherwise this "feature" of reseting the selection can be considered as a bug as no interaction was set from the table visual to remove the selection from another visual.
I have had a similar issue,
2 table visuals
tbl_test1 and tbl_test2
tbl_test1 filters -> tbl_test2
when clicking on a row in tbl_test2 it resets the filters (very annoying)
My partial solution was to create a measure that takes the SELECTEDVALUE() from tbl_test1 and do an IF statement comparison and if result is true it is 1 and false is 0
IF(VALUES(tbl_test2[Column1]) = [selected_value]),
1,
0)
Since we are in a measure, the context is column so you have to protect the IF statement by surrounding it in another IF statement
to check if there is more than 1 value returned.
The full expression is
Measure = IF(COUNTROWS(VALUES( tbl_test2[Column1] ))=1,
IF(VALUES( tbl_test2[Column1] ) = [selected_value] ,
1 ,
0 ),
2 )
So when I click on a row in tbl_test1 the matching rows in tbl_test2 get a 1 and the rest 0.
This works well.
Since slicers do preserve the filter I figured I could just set a slicer to the Measure column in tbl_test2 and make the default value 1 and then hide the slicer.
But... you can't set a slicer to a measure column because of course why would you want to do such a silly thing.
So this is simply not something that Power bi is capable of sadly.
In the end I just set a slicer next to table 2 and based on the results from table 1 the end user
can make a selection in the slicer to see the data they want.
Kind of dumb, but the only way.
Lex