Martin Schoombee takes a look at using calculation groups with role-playing dimensions:
The 2019 release of Analysis Services (compatibility level 1500) brought about a new feature called Calculation Groups, which makes it easier to apply the same logic to multiple measures without the need to duplicate code. Each calculation group represents an entity (table) with attributes (columns) and attribute values (calculation items), and because of this implementation it can be used to deal with role-playing dimensions as well.
Click through to see how it works, as well as some gotchas to keep in mind.