Hopefully I've understood your problem,
I've created a dummy dataset and attached a workbook that I have created off of it.
Using a LOD calculation can be very powerful when working with aggregations. For more information about LOD expressions: Overview: Level of Detail Expressions
Hope it helps
earnings example.twbx 5.0 KB