You need to create a new CORPORATE_ID column element in the information designer which includes the logic you outlined. It can then be used to filter on demand tables.