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
_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

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.