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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Count available working hours for a specific period and compare with billed hours

Hi!

 

I have added a simple datetable with calendarauto (year, quarter, month, week, day, date) which I've connected with another table that contains order data (order rows). Everything works fine between the two tables.

 

In the order data table I have information about specific orders (order rows) like Resource/MachineID, Quantity billed hours, Price, ItemID etc. Now I would like to be able compare these billed hours with available working hours for every MachineID to get a billable % for each week, month, quarter, year or so.

 

I'm a newbie in Power BI and I put hours in googeling and youtubeing about networkdays and other functions but I have no clue where to start or how to solve this.

 

Do anyone know of a solution?

 

 

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Anonymous 

please try

% hours =
DIVIDE (
SUM ( OdereDate[Billed Hours] ),
CALCULATE (
SUM ( OdereDate[Billed Hours] ),
ALLEXCEPT ( OdereDate, OdereDate[MachineID], OdereDate[Date] )
)
)

Anonymous
Not applicable

Thanks for you reply, @tamerj1 

I think I will first need a measure for available working hours in order to be able to compare billable hours with it. In 2022 there were like 2024 total work hours when excluding weekends and holidays with a workday of 8 hours. And the measure for available working hours must be possible to break down to every date in order to be able to compare it with billable hours for a specific date period.

@Anonymous 

You may use 

Working Days =
COUNTROWS ( FILTER ( datetable, datetable[Workday?] = "Yes" ) ) * 8

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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