Forum Discussion
Merleau
Helper II
1 year agoCross filtering: How to cross filter a list column using a value from a different table
Hello In my report I need to cross filter two tables which are not linked in my data model. Table 1 Id Name Code Id1 Id1_name A Id2 Id2_Name B Id3 Id3_Name...
Anonymous
1 year agoNot applicable
Hi Merleau ,
Please try this
Measure = IF( SEARCH(TRIM( SELECTEDVALUE(Table1[Code])), SELECTEDVALUE('Table2'[Code list]), 1, 0)<>0, SELECTEDVALUE('Table2'[Code list]))
Best Regards,
Wearsky
Merleau
Helper II
1 year agoHello Anonymous
Thank you for your prompt response. The measure works but only consistently for codes with double letters. For single-letter codes, it sometimes returns records that include double-letter codes where one of the letters matches the single-letter code.
For example, selecting "L" (Line 5 in Table1) also returns "BL, AL, A" (Line 4 in Table2).
Could you advise on how this can be fixed?
My real data have a long list of codes most are single-letter and an even longer list of "Code list" that include different codes combination.
Thank you,