Forum Discussion
Filter on data that does not exist in a table
Hi,
I have two tables in my model:
| ID | Name |
| 1 | Company A |
| 2 | Company B |
| 3 | Company C |
| 4 | Company D |
| 5 | Company E |
| 6 | Company F |
| 7 | Company G |
| 8 | Company H |
| 9 | Company I |
| ID | Transport Region |
| 1 | A |
| 1 | B |
| 4 | A |
| 4 | B |
| 4 | C |
| 5 | A |
| 6 | B |
| 7 | C |
| 8 | D |
The connection between those tables is One to Many (Name to Transport Region). The filter is activated in both directions.
The problem that I am facing is that I am not able to filter out Companies that do not have a transport region attached to them. I cannot merge the tables because then I would have multiple lines in the Name table for one Name.
Thanks!
Madis
14 Replies
- amitchandak
Super User
MadisMerk , Use this measure with company name in a table visual and try
if(isblank(count(Table2[Transport Region])),1,blank())
- MadisMerk
Helper I
Hi,
It does work partially, but I would like to use it in a slicer and also have the rest of the transport regions present in the same slicer.
- v-kelly-msft
Community Support
Hi MadisMerk ,
First create a column in company table:
_region = RIGHT('Table'[Name],1)Then create a measure as below:
Measure = IF(NOT(MAX('Table'[_region]) in FILTERS('Table (2)'[Transport Region])),1,BLANK())And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!