Forum Discussion
Filter table based on another table
- 5 years ago
Hi,
Your LOOKUPVALUE() calculated column formula is correct. Infact, if there are no repetitions in TableB, then a RELATED() function should also work provided you can a relationship (Many to One and Single) from TableA to TableB. Try the RELATED() function. Also ensure that the spellings of book id should be the same in both tables.
- 5 years ago
Hi, Anonymous ;
Here are two methods for your case.
Method 1:create a measure.
flag = IF(MAX([book_id]) in DISTINCT('TableB'[book_id]),0,1)then apply it into filter.
Methed 2: create a table.
Newtable = VAR _B=DISTINCT('TableB'[book_id]) return SUMMARIZE(FILTER('TableA',NOT([book_id] ) in _B),[book_id],[ price])The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the suggestion. Yes ,there are no duplicates in table B. I have tried to create calculated column in Table A with this DAX, but the result does not give me only 10 matches insted i should have 1500 matches.
Hi,
Your LOOKUPVALUE() calculated column formula is correct. Infact, if there are no repetitions in TableB, then a RELATED() function should also work provided you can a relationship (Many to One and Single) from TableA to TableB. Try the RELATED() function. Also ensure that the spellings of book id should be the same in both tables.
- Anonymous5 years agoNot applicable
LOOKUPVALUE() works as well.
Thank you !
- Ashish_Mathur5 years agoSuper User
You are welcome.