Ok, so I've created quick example data. I have the following tables:
Unused holiday data:
Relationship by Department and Year-Month as below (Calendar table generated by functions CALENDAR...)
What I want, is to have in one table (Table A) columns like below. The problem is, that I can't find the solution to have both relationships working at same time - Departement<->Departement and Year-Mont<->Year Month.
In Table B you can see the Headcount by mont measure working fine, in Table A it is not.
This measure formula is as below.
Hope it is more clear now:)
Headcount by month = CALCULATE(SUM(headcount[Headcount]); USERELATIONSHIP('Calendar'[Year-Month];headcount[Year-Month]))