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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
HassanAshas
Helper V
Helper V

How to find the total contribution % of each Department towards Total Number?

Hi, I have records of Employees working in different Competencies and Practices. For each employee, I have Billed and Unbilled Hours.

 

The data looks something like this, 

 

Emp_IDEmp_NameCompetencyPracticeBilled HoursUnbilled Hours
25SamData & IntegrationML1105
26EmmaDevelopmentPython7525
27OwenData & IntegrationData Engineering9530
28IsabellaDesignUI/UX2570
29LiamData & IntegrationETL8540
30NoraDevelopmentJava0125
31WilliamData & IntegrationBI4560
32AvaDevelopment.NET0100
33ElijahDesignInteraction Design3550
34SophiaData & IntegrationCloud5535
35LucasDevelopmentJavaScript0120
36OliviaDesignVisual Design1585
37NoahData & IntegrationML12515
38GraceDevelopmentRuby0110
39HenryDesignUsability Testing595
40MiaData & IntegrationETL6545
41AidenDevelopmentC++0130
42EllaDesignUI/UX3060
43JacobData & IntegrationBI8020
44ChloeDevelopmentPython0

130

 

My aim is to find Unbilled Hours Ratio. Formula of Unbilled Hours Ratio is, 

 

 

 

 

Unbilled Hours Ratio = Unbilled Hours / (Billed Hours + Unbilled Hours)

 

 

This, I have already implemented using following DAX, 

 

Unbilled Hours Ratio = 

var _UnbilledHours = SUM(Employees[Unbilled Hours])
var _BilledHours = SUM(Employees[Billed Hours])
var _TotalHours = _UnbilledHours + _BilledHours

var _Result = 
    DIVIDE(
        _UnbilledHours, 
        _TotalHours
    )
return _Result

 

 

This is giving me the value of 61.5%. 

Now, I want a Bar Chart that shows % values each "Competency" and each "Practice" is contributing towards this 61.5%. 

For now, I have the following visual, 

 

HassanAshas_0-1692363925017.png

 

This basically shows me the Unbilled Hours Ratio for each Competency. I don't want that, I want to find the percentage value each Competency contributed towards the 61.5%. 

The similar will be done for Practices as well (so if I drill down to all the Practices for one Competency, it will show me the % values each Practice contributed towards the total % percentage value of the Competency Unbilled Hours Ratio) 

 

Can anyone help in creating a DAX for this scenario? 

 

If you would like to download the Sample Power BI File, you may do so from here: https://drive.google.com/file/d/1CM918As9DGGt3daOtHaGpYYVkc8IjmZi/view?usp=sharing

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@HassanAshas 

Are these the % you are looking for?

jdbuchanan71_0-1692423927426.png

Unbilled Hours Ratio = 

var _UnbilledHours = SUM(Employees[Unbilled Hours])
var _BilledHours = SUM(Employees[Billed Hours])
var _TotalHours = _UnbilledHours + _BilledHours
VAR _FullTotal = CALCULATE ( SUM ( Employees[Unbilled Hours] ), ALL(Employees) ) + CALCULATE ( SUM ( Employees[Billed Hours] ), ALL(Employees) ) 

var _Result = 
    DIVIDE(
        _UnbilledHours, 
        _FullTotal
    )
return _Result

 

View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

Proportion chart.pbix

 

Why not use pie chart to intuitively reveal relative proportion?

ThxAlot_0-1692425473834.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



jdbuchanan71
Super User
Super User

@HassanAshas 

Are these the % you are looking for?

jdbuchanan71_0-1692423927426.png

Unbilled Hours Ratio = 

var _UnbilledHours = SUM(Employees[Unbilled Hours])
var _BilledHours = SUM(Employees[Billed Hours])
var _TotalHours = _UnbilledHours + _BilledHours
VAR _FullTotal = CALCULATE ( SUM ( Employees[Unbilled Hours] ), ALL(Employees) ) + CALCULATE ( SUM ( Employees[Billed Hours] ), ALL(Employees) ) 

var _Result = 
    DIVIDE(
        _UnbilledHours, 
        _FullTotal
    )
return _Result

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors