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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mrjkwon
Regular Visitor

Summing of a % measure issue (staff utilization)

Wanting to pick anyone's brains over a dashboard I am looking to create in Power BI.

 

I have a transactional data table containing timesheet data for employees.

EmployeeDateTypeHoursRevenue
Employee A1/08/2021Chargeable Time8800
Employee B1/08/2021Chargeable Time8960
Employee C1/08/2021Non-Chargeable Time80
Employee A2/08/2021Chargeable Time8800
Employee B2/08/2021Chargeable Time8960
Employee C2/08/2021Non-Chargeable Time80
Employee A3/08/2021Chargeable Time8800
Employee B3/08/2021Non-Chargeable Time80
Employee C3/08/2021Chargeable Time8600
Employee A4/08/2021Non-Chargeable Time80
Employee B4/08/2021Non-Chargeable Time80
Employee C4/08/2021Chargeable Time8600
Employee A5/08/2021Non-Chargeable Time80
Employee B5/08/2021Non-Chargeable Time80
Employee C5/08/2021Chargeable Time8600

 

From the data above I have been able to create the following measures to calculate the following (when a filter or slicer is applied)

Employee AChargeable Time24
Employee BChargeable Time16
Employee CChargeable Time24
   
Employee ATotal Hours40
Employee BTotal Hours40
Employee CTotal Hours40
   
Employee AUtilisation 60.0%
Employee BUtilisation 40.0%
Employee CUtilisation 60.0%
   
Employee ARevenues2400
Employee BRevenues1920
Employee CRevenues1800

 

I also have a fact table that contain budgeted utilisation for each employee

EmployeeBudgeted Util
Employee A65.0%
Employee B50.0%
Employee C45.0%

 

One of the challenges I've encountered is that the actual utilisation (a measure) will sum when no filter/slicer is applied, giving a value that is 160%, as opposed to 53.3%. 

 

I need to create a measure that will 

- Take the actual hours, divide by the actual utilisation (both measures), then multiply by the budgeted utilisation to arrive at a budgeted hours

- Take the actual revenue, divide by the actual utilisation (both measures), then multiply by the budgeted utilisation to arrive at a budgeted revenue

 

The summing of the % measure makes my desire for the above two measures somewhat challenging.

 

Any guidance, logic or recommendations of DAX formulas that I should be using will be greatly appreciated.

 

Many thanks.

4 REPLIES 4
V-pazhen-msft
Community Support
Community Support

@mrjkwon 

Here are the steps you can follow:

 

1. Create measure.

When no filter/slicer is applied, giving a value that is 160%, as opposed to 53.3%. 

HASONEVALUE =

IF(

    HASONEVALUE('Table2'[Employee]),MAX('Table2'[Budgeted Util]), SUMX(ALL('Table2'),'Table2'[Budgeted Util]))

Vpazhenmsft_4-1629704924536.png

 

Budgeted hours and budgeted hours:

budgeted hours =

DIVIDE( [groupABC_sum],[divide]) * MAX('Table2'[Budgeted Util])

 

budgeted hours =

DIVIDE( [groupABC_sum],[divide]) * MAX('Table2'[Budgeted Util])

 

2. Result:

 

Vpazhenmsft_5-1629704936175.png

 

 

Best Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Many thanks for your help here! 

 

I wonder if I could seek your help with the review of the attached working file:

 

https://www.dropbox.com/s/35bfklhfdfigb88/Utilisation%20Report%20Excerpt.pbix?dl=0

 

Essentially I am trying to arrive at a measure for a tile that would help me fill the two tiles that are currently empty:

- the top tile for budgeted revenues, which conceptually would take the total number of direct hours, divided by the actual utilization and then multiplied by the budgeted utilization

- the bottom tile for budgeted revenues, which conceptually would take the total billable revenues, divided by the actual utilization and then multiplied by the budgeted utilization

 

mrjkwon_0-1629892066581.png

 

 

There are select tiles that remain blank until a filter is applied on the dashboard. Whilst they have been configured to intentially remain blank, one of the tiles that I would actually like to show irrespective of whether a filter is applied, is the Utilization - Actual tile. Unfortunately I have been getting stuck with showing the utilization for the selected time period for the entire organization (it appears to sum up all the utilization values to a number that does not make sense)

 

mrjkwon_1-1629892066583.png

 

 

Any light you could shed would be greatly appreciated!

 

 

lbendlin
Super User
Super User

@mrjkwon 

"I also have a fact table that contain budgeted utilisation"

That's not a fact table. That's a dimension table and it needs to be wired as such in your data model. Would you be able to show your current model (sanitized) ?

Greetings, and many thanks for your reply.

 

Attached is an excerpt of the model.

 

https://www.dropbox.com/s/35bfklhfdfigb88/Utilisation%20Report%20Excerpt.pbix?dl=0

 

Essentially I am trying to arrive at a measure for a tile that would help me fill the two tiles that are currently empty:

- the top tile for budgeted revenues, which conceptually would take the total number of direct hours, divided by the actual utilization and then multiplied by the budgeted utilization

- the bottom tile for budgeted revenues, which conceptually would take the total billable revenues, divided by the actual utilization and then multiplied by the budgeted utilization

 

mrjkwon_0-1629891067790.png

 

There are select tiles that remain blank until a filter is applied on the dashboard. Whilst they have been configured to intentially remain blank, one of the tiles that I would actually like to show irrespective of whether a filter is applied, is the Utilization - Actual tile. Unfortunately I have been getting stuck with showing the utilization for the selected time period for the entire organization (it appears to sum up all the utilization values to a number that does not make sense)

 

mrjkwon_1-1629891403069.png

 

Any light you could shed would be greatly appreciated!

 

 

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.