I'm not sure of what you are looking for but to my understanding, you want to join two tables using MRN and pull data from them. Here is a sample worksheet attached please have a look at it and let me know if I'm in right direction.
SampleRehab.twbx.zip 66.4 KB
I was trying to avoid that approach because of the size of my tables. I was hoping to write a calculation to count the MRN when patient I discharge date = admit date of patient J and the MRN of patient I and patient J are the same.