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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Multi-Select slicer DAX

Hi All,

I'm a little stuck on somthing that should be quire easy.

I have a DIM table that I would filter a FACT table by.

The code below works fine for a single selection, but obviously wont work for a multi-select.

I have tried using ALLSELECTES & CONCATENATEX which connectly returns the selected list, but I still have the problem of:

<List> in Values (table[column])

Any suggestions on how to change the fomula below to support mulit-select?

 

Dependencies Filter # = if (
    SELECTEDVALUE('DIM Dependencies'[Name]) in values('FACT Dependencies'[Source Name]) ||
    SELECTEDVALUE('DIM Dependencies'[Name]) in values('FACT Dependencies'[Target Name]), 1, 0 )
 
Cheers,
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@Anonymous I am glad to help you.
If you want to achieve the effect of slicer multi-select, as you said, you can try to use the CONCATENATEX function to achieve, by determining whether the field in the form is within the string composed of all the options of the slicer to control the return result, the following is my test, I hope it can give you help.
table'FACT Dependencies'

vjtianmsft_0-1721013752126.png

Table'DIM Dependencies'

vjtianmsft_1-1721013798397.png

vjtianmsft_2-1721013851227.png

 

M_result = 
VAR source_value=MAX('FACT Dependencies'[Source Name])
VAR target_value=MAX('FACT Dependencies'[Target Name])
VAR m_allselect=
CONCATENATEX(
    VALUES('DIM Dependencies'[Name]),
    [Name],
    ""
)
RETURN IF( CONTAINSSTRING(m_allselect,source_value)||CONTAINSSTRING(m_allselect,target_value),1,0
)

 

vjtianmsft_3-1721013870506.png

 



I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks ... works a treat!

Anonymous
Not applicable

Hi,@Anonymous 
Thank you for your reply .
You are welcome.

Anonymous
Not applicable

Hi,@Anonymous I am glad to help you.
If you want to achieve the effect of slicer multi-select, as you said, you can try to use the CONCATENATEX function to achieve, by determining whether the field in the form is within the string composed of all the options of the slicer to control the return result, the following is my test, I hope it can give you help.
table'FACT Dependencies'

vjtianmsft_0-1721013752126.png

Table'DIM Dependencies'

vjtianmsft_1-1721013798397.png

vjtianmsft_2-1721013851227.png

 

M_result = 
VAR source_value=MAX('FACT Dependencies'[Source Name])
VAR target_value=MAX('FACT Dependencies'[Target Name])
VAR m_allselect=
CONCATENATEX(
    VALUES('DIM Dependencies'[Name]),
    [Name],
    ""
)
RETURN IF( CONTAINSSTRING(m_allselect,source_value)||CONTAINSSTRING(m_allselect,target_value),1,0
)

 

vjtianmsft_3-1721013870506.png

 



I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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