Forum Discussion
Attrition
- 4 months ago
Hi Sekharnaga
You can model this more cleanly by avoiding a direct relationship between the Headcount table and the Attrition table through a combined helper sheet.
A more reliable approach is usually a star-schema style model with:
* one Calendar table
* one Director dimension table
* the Headcount fact table
* the Attrition fact tableThen create relationships such as:
* Calendar[Date] or Calendar[MonthKey] -> Headcount[Date/MonthKey]
* Calendar[Date] or Calendar[MonthKey] -> Attrition[Date/MonthKey]
* Director[Director] -> Headcount[Director]
* Director[Director] -> Attrition[Director]In most cases, these relationships should be one-to-many and single direction, filtering from the dimension tables to the fact tables.
It is also a good idea to use a proper month key rather than only month names like Jan, Feb, etc., because month names alone can sometimes create confusion across fiscal years. A YearMonth key such as 2024-01, or a proper month-start date, usually works much better.
Your attrition measure can then be calculated in a straightforward way, for example:
Attrition % =
DIVIDE(
[Total Attrition],
[Total Headcount]
)with both measures being filtered by the same Calendar and Director dimensions.
If selecting FY is automatically reducing the result to one month, that usually points to something in the model structure, such as:
* the FY-to-month mapping in the calendar
* the relationship cardinality
* or the helper table filtering only certain valid combinationsSo I would start by reviewing the model design and relationship keys first, because that is very likely where the filtering behavior is coming from.
If you would like more precise help, feel free to share a small sample PBIX or screenshots of the model through any public cloud link, with sensitive data removed, and include the expected result as well. That would make it much easier for the community to understand the setup and suggest the right fix.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Sekharnaga
Can you share the sample data of tables in text format, data modelling you are looking for and the output you need.