Forum Discussion
Filtering between 2 views - with a shared subset of rows
Hello,
I have this scenario: I have this data table loaded in PBI:
I want to be able to switch between view Y (rows 1-9) and view X (rows 4-12) by selecting the view I want with a slicer/filter - NOT by deselecting the subset of rows I want to hide.
I just want to have a slicer with two options: View X and View Y.
Is there a way to do so WITHOUT having to duplicate rows that should be visible in both views?
Warm regards,
Jakub
3 Replies
- MFelix
Super User
Hi jdusek92 ,
Create a table for the slicer with the Y / X lines then add the following measure:
Selection = SWITCH ( TRUE (); SELECTEDVALUE ( Slicer_Choice[Slicer_Choice] ) = "X" && ( SELECTEDVALUE ( Views_Table[vyew] ) = "X" || SELECTEDVALUE ( Views_Table[vyew] ) = "Always" ); 1; SELECTEDVALUE ( Slicer_Choice[Slicer_Choice] ) = "Y" && ( SELECTEDVALUE ( Views_Table[vyew] ) = "Y" || SELECTEDVALUE ( Views_Table[vyew] ) = "Always" ); 1; 0 )Now use tihs measure as a visual filter and select only the values equal to 1.
Check PBIX file attach.
Regards,
MFelix
- MFelix
Super User
Hi jdusek92 ,
Create a table for the slicer with the Y / X lines then add the following measure:
Selection = SWITCH ( TRUE (); SELECTEDVALUE ( Slicer_Choice[Slicer_Choice] ) = "X" && ( SELECTEDVALUE ( Views_Table[vyew] ) = "X" || SELECTEDVALUE ( Views_Table[vyew] ) = "Always" ); 1; SELECTEDVALUE ( Slicer_Choice[Slicer_Choice] ) = "Y" && ( SELECTEDVALUE ( Views_Table[vyew] ) = "Y" || SELECTEDVALUE ( Views_Table[vyew] ) = "Always" ); 1; 0 )Now use tihs measure as a visual filter and select only the values equal to 1.
Check PBIX file attach.
Regards,
MFelix
- jdusek92
Advocate III
Hello,
I am having problem with Column chart to display the data:
Table column displays correctly:
I have added data to your example:
https://drive.google.com/open?id=1Wi1wRx1DyC6tUAEL0wzIa-cdQdn8v7rM
I want to filter by "PRIZNAK" column:
- NORMAL selected = only NORMAL rows
- KOREKCE selected = all rows (NORMAL+KOREKCE)
Warm regards,
Jakub