Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
AaronJarboe
Regular Visitor

Dynamic Percent Calculation Issues

I'm working on a headcount/attrition report with two primary tables: Headcount and Offboardings.  Each table is granular to location, headcount type, and month. 

 

Example of Headcount table (vastly oversimplified - consider many more regions, many more months, etc):

MonthRegionTypeHeadcount
9/1/2017USManagement101
9/1/2017USSecurity64
9/1/2017EuropeManagement110
9/1/2017EuropeSecurity50
10/1/2017USManagement112
10/1/2017USSecurity60

 

Example of Offboarding table (vastly oversimplified - consider many more regions, many more months, etc):

 

MonthRegionTypeOffboardings
9/1/2017USManagement7
9/1/2017USSecurity2
9/1/2017EuropeManagement3
9/1/2017EuropeSecurity12
10/1/2017USManagement2
10/1/2017USSecurity5

 

I'm attempting to put together a chart where bars show total headcount month-over-month, and in overlayed lines show the percentage attrition per month based on a calculation.  In the example above, this would mean in September we had 24 total offboardings and 325 total headcount = 7.38% attrition.  I have created a measure in the Headcount table that performs this calculation: SUM(Offboardings)/SUM(Headcount).  This works just fine when there are no filters applied.

 

The issue lies when I create slicers for Region and for Type.  When I select the slicer for Region, it only applies the filter to the headcount table and not to the offboarding table.  This causes my calculation to get really out of whack (it would consider ALL offboardings regardless of region, divided by only headcount for the selected region, etc.)

 

How can I get the measure to consider the filter for both the numerator and denominator?

1 ACCEPTED SOLUTION
AaronJarboe
Regular Visitor

Turns out my filter was based on only one table and the tables weren't linked with common regions and types.  Fixed by creating a table to link the variables.

View solution in original post

1 REPLY 1
AaronJarboe
Regular Visitor

Turns out my filter was based on only one table and the tables weren't linked with common regions and types.  Fixed by creating a table to link the variables.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.