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
_isildur
New Member

Need help with a DAX measure that will calculate the hours spent on a task in a percentage

Hi Community,

 

I have tried to get my head around how to create a measure to calculate the following:

 

I want to create some sort of linear appreciation depending on how many hours a consultant spent on a task.

I have a startdate and an enddate for the specific task related for a project. I also have how many hours are allocated for the task and how many days are there from the startdate to enddate.
Ex.

 

Project nameTask nameStartdateEnddateAllocated HoursDatediffAvg Hours pr. day
Project XTask 101-11-202111-11-202125102,5
Project XTask 202-11-202115-11-202110130,75


If the todays date is greater than the enddate, then the task completeness should be 100%. If the enddate is greater than todays date, then I want the measure to show how many percentage of the allocated hours has been spent.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@_isildur , refer if this blog can help

Distributing/Allocating the Yearly Target(Convert to Daily Target): https://community.powerbi.com/t5/Community-Blog/Distributing-Allocating-the-Yearly-Target-Convert-to...

 

You need add today's logic

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @_isildur 

If I understand correctly, the percentage of the allocated hours spent should be equal to the percentage of the allocated days spent right? 

Divide (Today-Startdate,Datediff)


Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@_isildur , refer if this blog can help

Distributing/Allocating the Yearly Target(Convert to Daily Target): https://community.powerbi.com/t5/Community-Blog/Distributing-Allocating-the-Yearly-Target-Convert-to...

 

You need add today's logic

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.