Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi, I need help figuring out how to best fulfill this requirement: I have a multiple select slicer and a visual. If the user selects more than one item in the slicer, for each new selection, I would like there to be an additional visual that is filtered only by the added selected item, i.e. I do not want one visual that is sliced by the entire selection in the slicer, but rather one visual for each selected items (and filtered by that item only). Any chance to do so without creating separate slicers for each visual?
Solved! Go to Solution.
Hi @Anonymous
Your requirements are:
1. Only need a slicer.
2. If there is only one selection in this slicer, there will be only one visual filtered by this selection.
If there are multiple selections, power bi will create multiple visuals and each visual show values filtered by one of the selections.
Currently, power bi doesn't support to build visuals automatically to show values filtered by each selections when you select multiple filters in slicer.
I think you can try to build visuals manually and build some measures to filter the visuals to show values filtered by one of the selections in each visual.
My Sample:
Build a calculated table.
Slicer = VALUES('Table'[Category])
Use this table to build a slicer.
There are three selections in my slicer.(A,B,C) So I will build three visuals and build three measures to filter each visual one by one.
Filter 1 =
VAR _SEL =
VALUES ( Slicer[Category] )
VAR _Count =
COUNTROWS ( _SEL )
RETURN
IF (
ISFILTERED ( Slicer[Category] ),
IF (
_Count = 1,
IF ( MAX ( 'Table'[Category] ) IN _SEL, 1, 0 ),
IF (
MAX ( 'Table'[Category] )
IN _SEL
&& MAX ( 'Table'[Category] ) = "A",
1,
0
)
),
1
)
Filter 2 =
VAR _SEL =
VALUES ( Slicer[Category] )
VAR _Count =
COUNTROWS ( _SEL )
RETURN
IF (
ISFILTERED ( Slicer[Category] ),
IF (
_Count = 1,
0,
IF (
MAX ( 'Table'[Category] )
IN _SEL
&& MAX ( 'Table'[Category] ) = "B",
1,
0
)
),
0
)
Filter 3 =
VAR _SEL =
VALUES ( Slicer[Category] )
VAR _Count =
COUNTROWS ( _SEL )
RETURN
IF (
ISFILTERED ( Slicer[Category] ),
IF (
_Count = 1,
0,
IF (
MAX ( 'Table'[Category] )
IN _SEL
&& MAX ( 'Table'[Category] ) = "C",
1,
0
)
),
0
)
Add Filter 1 in filter fields in left visual ,Filter 2 in filter fields in mid visual, Filter3 in filter fields in right visual.
And set them to show items when the value =1.
Result:
By default left visual will show all values.
Only one selection in slicer. It will show values filtered by selection in left visual. Other visuals will show blank.
Multiple selections. Left visual will show values filtered by A, Mid visual will show values filtered by B, and last one show values filtered by C.
You can download the pbix file from this link: File
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you. I'm aware of the edit interaction option. However, e.g. in case of two selected items, I want that one slicer where they are select to interact with both visuals - it is the way of interacting that bothers me. Instead of it filtering both visuals by both items, I would like one visual to be filtered only be one selection and the other one only by the other selection.
Hi @Anonymous
Your requirements are:
1. Only need a slicer.
2. If there is only one selection in this slicer, there will be only one visual filtered by this selection.
If there are multiple selections, power bi will create multiple visuals and each visual show values filtered by one of the selections.
Currently, power bi doesn't support to build visuals automatically to show values filtered by each selections when you select multiple filters in slicer.
I think you can try to build visuals manually and build some measures to filter the visuals to show values filtered by one of the selections in each visual.
My Sample:
Build a calculated table.
Slicer = VALUES('Table'[Category])
Use this table to build a slicer.
There are three selections in my slicer.(A,B,C) So I will build three visuals and build three measures to filter each visual one by one.
Filter 1 =
VAR _SEL =
VALUES ( Slicer[Category] )
VAR _Count =
COUNTROWS ( _SEL )
RETURN
IF (
ISFILTERED ( Slicer[Category] ),
IF (
_Count = 1,
IF ( MAX ( 'Table'[Category] ) IN _SEL, 1, 0 ),
IF (
MAX ( 'Table'[Category] )
IN _SEL
&& MAX ( 'Table'[Category] ) = "A",
1,
0
)
),
1
)
Filter 2 =
VAR _SEL =
VALUES ( Slicer[Category] )
VAR _Count =
COUNTROWS ( _SEL )
RETURN
IF (
ISFILTERED ( Slicer[Category] ),
IF (
_Count = 1,
0,
IF (
MAX ( 'Table'[Category] )
IN _SEL
&& MAX ( 'Table'[Category] ) = "B",
1,
0
)
),
0
)
Filter 3 =
VAR _SEL =
VALUES ( Slicer[Category] )
VAR _Count =
COUNTROWS ( _SEL )
RETURN
IF (
ISFILTERED ( Slicer[Category] ),
IF (
_Count = 1,
0,
IF (
MAX ( 'Table'[Category] )
IN _SEL
&& MAX ( 'Table'[Category] ) = "C",
1,
0
)
),
0
)
Add Filter 1 in filter fields in left visual ,Filter 2 in filter fields in mid visual, Filter3 in filter fields in right visual.
And set them to show items when the value =1.
Result:
By default left visual will show all values.
Only one selection in slicer. It will show values filtered by selection in left visual. Other visuals will show blank.
Multiple selections. Left visual will show values filtered by A, Mid visual will show values filtered by B, and last one show values filtered by C.
You can download the pbix file from this link: File
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous use formatting options, select the slicer and go to formatting and turn off the interaction you dont want for the visuals.
https://windowsreport.com/turn-off-interactions-power-bi/
follow above
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |