Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Richard_Halsall
Helper IV
Helper IV

Multiple selection from slicer with multiple values in column

Hi all

Struggling to write a correct DAX measure to return a value of 1 in the following scenario

I have a disconnected table (Technician Roles) of unique job roles which is the data for the slicer

RoleSort
Role 11
Role 22
Role 33

 

I have a DimTechnicians table with a role field (for which they may have multiple)

IdNameRole
1Person 1Role 1
2Person 2Role 2; Role 3
3Person 3Role 3
4Person 4Role 3; Role 1; Role 3


I then have a Fact table at the technician ID level on which I have based a table visual

Single select of the slicer works fine, multiple select doesn't

Richard_Halsall_0-1729256175310.png

Richard_Halsall_1-1729256216200.png

I have written this measure which I place on the table visual as a filter

To filter = SEARCH(SELECTEDVALUE('Technician Roles'[Technician Role]),SELECTEDVALUE(DimTechnicians[Job_Title]),,-1)
 
I have also tried this
 
ToFilter1 =
Var textselect=selectedvalue('Technician Roles'[Technician Role])
var textfinal=SELECTEDVALUE('DimTechnicians'[Job_Title])
return
if(CONTAINSSTRINGEXACT(textfinal,textselect),1)

 

Neither measure works

So for multiple slicer selection, using the example above, I would want to return technician id's who have Blade Tech 2 or Service Tech 4 in their Job Title

Any help would ba appreciated. Thanks

 

1 ACCEPTED SOLUTION
DallasBaba
Skilled Sharer
Skilled Sharer

 @Richard_Halsall can try below measure. It will checks if the technician's role field contains any of the selected roles. If so, it returns 1, otherwise 0.

 

 

 

ToFilter = 
VAR SelectedRoles = CONCATENATEX(VALUES('Technician Roles'[Role]), 'Technician Roles'[Role], ";")
VAR TechnicianRoles = DimTechnicians[Role]
RETURN
IF (
    NOT(ISBLANK(TechnicianRoles)) && TechnicianRoles <> "",
    IF (
        LEN(SelectedRoles) > 0 && 
        COUNTROWS(
            FILTER(
                VALUES('Technician Roles'[Role]),
                CONTAINSSTRING(TechnicianRoles, 'Technician Roles'[Role])
            )
        ) > 0,
        1,
        0
    ),
    0
)

 

 

 

 

If this don't work, kindly @me and upload a sample of the pbix file you are working with for easy debugging. 

 
Thanks
Dallas

View solution in original post

2 REPLIES 2
DallasBaba
Skilled Sharer
Skilled Sharer

 @Richard_Halsall can try below measure. It will checks if the technician's role field contains any of the selected roles. If so, it returns 1, otherwise 0.

 

 

 

ToFilter = 
VAR SelectedRoles = CONCATENATEX(VALUES('Technician Roles'[Role]), 'Technician Roles'[Role], ";")
VAR TechnicianRoles = DimTechnicians[Role]
RETURN
IF (
    NOT(ISBLANK(TechnicianRoles)) && TechnicianRoles <> "",
    IF (
        LEN(SelectedRoles) > 0 && 
        COUNTROWS(
            FILTER(
                VALUES('Technician Roles'[Role]),
                CONTAINSSTRING(TechnicianRoles, 'Technician Roles'[Role])
            )
        ) > 0,
        1,
        0
    ),
    0
)

 

 

 

 

If this don't work, kindly @me and upload a sample of the pbix file you are working with for easy debugging. 

 
Thanks
Dallas

@DallasBaba Many thanks worked a treat

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.