Forum Discussion
Anonymous
2 years agoNot 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 ...
- Anonymous2 years ago
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'Table'DIM Dependencies'
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 )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.
Anonymous
2 years agoNot applicable
Thanks ... works a treat!
Anonymous
2 years agoNot applicable
Hi,Anonymous
Thank you for your reply .
You are welcome.