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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
VipinReddy
Employee
Employee

Allocation of Hours

Hey, 

VipinReddy_0-1626291821057.png

Above is the sample data that is available. I want to allocate 100hours for each resource which should be divided equally. The output I am looking for is as follows. 

VipinReddy_1-1626291985065.png

 

Thank you in advance.

 

 

 

 

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @VipinReddy 

(1)Create a column with fixed value “100” .

Hours = 100

(2)Calculate the numbers of rows in [Resource] with a column .

count number = CALCULATE(COUNT('Table'[Task]),ALLEXCEPT('Table','Table'[Resource]))

(3)Create a column to return the value Allocate Hours .

Allocate Hours = 'Table'[Hours]/'Table'[count number]

Then add these columns in a table visual .

You can see the result ,you can hide the Hours and count number in the visual .

Ailsamsft_1-1626682581681.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

View solution in original post

4 REPLIES 4
v-yetao1-msft
Community Support
Community Support

Hi @VipinReddy 

(1)Create a column with fixed value “100” .

Hours = 100

(2)Calculate the numbers of rows in [Resource] with a column .

count number = CALCULATE(COUNT('Table'[Task]),ALLEXCEPT('Table','Table'[Resource]))

(3)Create a column to return the value Allocate Hours .

Allocate Hours = 'Table'[Hours]/'Table'[count number]

Then add these columns in a table visual .

You can see the result ,you can hide the Hours and count number in the visual .

Ailsamsft_1-1626682581681.png

I have attached my pbix file ,you can refer to it .

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

GilbertQ
Super User
Super User

Hi @VipinReddy 


Can you give a working example with sample data of what you want the expected result to be?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

GilbertQ
Super User
Super User

Hi @VipinReddy 

 

Do you want this in the column or as a measure?

 

If it is a measure you could do the following:

 

Allocated Hours = DIVIDE(100,COUNTROWS(TableName))




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

I have multiple resources in my data. I want 100hours to be allocated to each of these resources and divide equally by the number of tasks.

VipinReddy_0-1626299180287.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors