Forum Discussion
Guli
Helper I
6 years agoHow to filter a table based on selected slicer result.
I have two tables like below: Table A: Table B: I want to relate these two tables, but since their relationship is many to many, using Related function is not useful. My objective r...
- 6 years ago
Hi Guli ,
You can set the many-to-many relationships status as inactive and create this measure to achieve it:
matchkey_with_TableB = IF ( ISFILTERED ( 'Table B'[ID] ), CALCULATE ( MAX ( 'Table B'[Filmtype] ), USERELATIONSHIP ( 'Table A'[Film], 'Table B'[Filmtype] ) ) )Attached sample file that hopes to help you: How to filter a table based on selected slicer result.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Guli
Helper I
6 years agov-yingjl , the DAX is
indicater = IF('Table A'[Film]='Table A'[matchkey_with_TableB],1,BLANK())
v-yingjl
Community Support
6 years agoHi Guli ,
You can create this measure:
indicator =
IF(
SELECTEDVALUE('Table A'[Film]) = 'Table A'[matchkey_with_TableB],
1,BLANK()
)
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.