Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi ,
How can we get selected list of values from slicer in {"val_1","val_2","val_3"} format, so that the list can be put under IN () operator ?
Currently using a measure,
Solved! Go to Solution.
Hi @ak1207 ,
Please follow these steps:
(1) Create a new measure
FLAG =
IF (
ISFILTERED ( Slicer_Table[Col_2] ),
IF (
MAX ( 'Table 1'[Col_1] )
IN EXCEPT (
SUMMARIZE (
FILTER ( 'Table 1', [Col_2] IN VALUES ( Slicer_Table[Col_2] ) ),
[Col_1]
),
SUMMARIZE (
FILTER (
ALL ( 'Table 1' ),
NOT ( [Col_2] ) IN VALUES ( 'Slicer_Table'[Col_2] )
),
[Col_1]
)
),
1
)
)
(2) Add filtering
(3)Final output
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ak1207 ,
Please follow these steps:
(1) Create a new measure
FLAG =
IF (
ISFILTERED ( Slicer_Table[Col_2] ),
IF (
MAX ( 'Table 1'[Col_1] )
IN EXCEPT (
SUMMARIZE (
FILTER ( 'Table 1', [Col_2] IN VALUES ( Slicer_Table[Col_2] ) ),
[Col_1]
),
SUMMARIZE (
FILTER (
ALL ( 'Table 1' ),
NOT ( [Col_2] ) IN VALUES ( 'Slicer_Table'[Col_2] )
),
[Col_1]
)
),
1
)
)
(2) Add filtering
(3)Final output
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ak1207 , In case you are more than one selected then you can use in values(Table[values])
example
filter(Table, Table[Value] in values(Table[Values]))
Thanks @amitchandak for the response. However, the solution provided in not working for me.
Please find below problem exploration with the usecase/example :
Table 1 | |
Col_1 | Col_2 |
A | 1 |
B | 1 |
B | 2 |
C | 1 |
C | 2 |
C | 3 |
D | 1 |
Slicer_Table |
Col_2 |
1 |
2 |
3 |
If selected value(s), from slicer, only the Col_1 data which belong to the selected value and NOT anything else should display.
View : Table with Table_1[Col_1] vs Measure and a slicer with Slicer_Table[Col_2]
For example,
if selected 1, only A & D should show
if selected 2, no one should show (since 2 mapped to B & C but they belong to other Col_2 data as well)
if selected 1 & 2, A,B & D should show
if selected 1,2 & 3 ; All should show
WORKING WITH HARDCODED VALUE 1 & 2 ::
Measure_x =
Measure_y=
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |