I have 3 tables:
- contains team code, position name and number of people
- contains team code and team name
- contains list of people with their names, team code, position name and various other information like marital situation, etc
I have connected table 1 with table 2 and table 3 with table 1 by team code (one to many).
Now I need to create a table, which would contain team code, position name and 3 calculated columns (‘Single’, ‘Married’, ‘Divorced’) with an amount of people, which have such words in their ‘marital situation’ column.
Tried some DAX code using sumx, but it looks that in gives only a number of people in that team.
How can I achieve such a grouping and calculation?