Filter table only if value in column of other table is not empty
I need your help. I need to sum amount from journal entries (can't share) if row from journal entry meets criteria from bridge table
but if value in column is empty in bridge table, i don't want to apply filter to journal entries table column (journal entry table may have value in such column which may be in different case used as criteria). Tables are unrelated. From resulting filtered table i need to sum one column with amount. I tried calculated column, and I can't to power query by myself that well. Simply it comes down to based on condition in one table how to not filter other table.