I have a PostgreSQL database containing various education data such school-level test scores and enrollment figures. I need to separate enrollment from test scores because
However, each fact table has a different subset of the "shared" fields, so I wouldn't be able to properly key in my fact tables.
One of the inputs to your cartesian dimension would be 'N/A' against Subject and Test Code (since that is not in the enrollments table)
So when you measure by 'Gender' the Test Scores match against dimension records with valid Subjects and Test Codes, and Enrollment matches against records with 'N/A' Subjects and Test Codes
Then when you roll up by Gender, everyhing 'just works' nicely.