cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## Add true or false in table if slicer is selected

I am in urgent need of help following hours of searching!

I have two tables:

Table:

 Term Name Result T1 Name1 2 T2 Name1 4 T3 Name2 6 T3 Name3 8

Unrelated slicer table:

 Name Name1 Name2 Name3

What I want to do:

• Select a name in the slicer
• Create a measure to add to the main table to show a true if the name is selected.

I have tried a few formulas, but I think they are falling over where there are multiple rows.

Help would be greatly appreciated.

1 ACCEPTED SOLUTION
Super User

@Anonymous ,  Try a measure like

Measure =

calculate(count(*), filter(Table, table[Name] in values(Table2[Name])))+0

refer my video on this -https://www.youtube.com/watch?v=lOEW-YUrAbE

3 REPLIES 3
Super User

@Anonymous ,  Try a measure like

Measure =

calculate(count(*), filter(Table, table[Name] in values(Table2[Name])))+0

refer my video on this -https://www.youtube.com/watch?v=lOEW-YUrAbE

Anonymous
Not applicable

Will try this out it looks more elegant than the one I just found:

Measure =
VAR __T =VALUES(Slicer[Name])
RETURN
IF(__T in VALUES(Table[Name]) , TRUE(), FALSE())
Super User

@Anonymous , Try like

Measure =
VAR __T =VALUES(Slicer[Name])
RETURN
IF(Table[Name] in _T , TRUE(), FALSE())

Announcements