first simple assumption is that ID represent region or any other dimension beeing a lower granularity of Region hierarchy data.
The simplest way of doing it is to flag records in dimensional table.
then in Table1 you applymap like this
ApplyMap('FlagMap',ID,0) as Flag
then simply refer to field "Flag" and:
0 - represents excluded
1 - represents included or shown up in Fact
Solution based on expressions can also be achieved but this would be the easiest and the most efficient one i quess.