Addressing calculation issues like this can be difficult without having the packaged workbook on hand and I understand that you cannot attach the workbook. i am going to provide some documentation from the Tableau Product help guide as well as some additional material. The first is information on how our table calculations work which I believe will provide additional insight for creating and using calculated fields. Next is a series of links for using LOD expressions in calculated fields. LOD expressions allow for the calculation to be performed on the database level instead of the level of the view.
I believe through the use of LOD expressions you will be able to return the expected results.