This is a really interesting problem. I suspect the answer will follow the general pattern of creating a virtual table, and then testing through the IF(HASONEVALUE()) construct whether the row is a total or not, similar to the approach used below. However, the subtotal issue throws a new wrinkle into the pattern that I suspect can be handled through the ISINSCOPE() function to determine whether it’s a grand total or a subtotal.
If you can please post your PBIX file, I’d be eager to take a shot at a solution.
Thanks.
- Brian