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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

calculating %age resource allocation

Hi,

 

I am creating a report to calculate %age allocation of each resource per month. It varies per month because there are different working hours each month. I am trying to calculate CAP by Workinghours to derive the %age. CAP is a measure while Workinghours is a column and PowerBI is not letting me do that. Can anyone help me with that. 

 

Here is the data set:

 

Year-MonthWorkinghoursCAP
2020-01154154
2020-0214021

 

1 ACCEPTED SOLUTION

Hi , @Anonymous 

Try measures as below:

%age CAP = 
sumx(
    'Table',
    [CAP]/CALCULATE(MAX('Table'[Workinghours]))
)

Pbix attached

 

Best Regards,
Community Support Team _ Eason
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

6 REPLIES 6
amitchandak
Super User
Super User

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

We have capacity of each resource in Project Online i.e. CAP. For each resource, I have entered that how many hours each resource is available per month.  I need to convert the capacity for each resource to a %age. For this I need to divide the capacity by number of working hours per month. 

 

Lets say I have a capacity of 26 hours in for Month of January and there are 154 working hours in the month, so my %age capacity will 26/154*100

 

When I try to divide capacity by working hours, I get an error - "A single value for column"Workinghours" in table "Hourspermonth" cannot be determined. This can happen when a measure formula referes to a column taht contains many values without specifiying an aggregation such as min, max, count, or sum"

 

Hope this helps. 

Hi , @Anonymous 

If I understand your requirement correctly that you want to   divide  "CAP" by  "Workinghours "
 "CAP" is a measure , "Workinghours " is a calculate column ,right ?

If it is ,please kindly show me the dax formula  about "CAP" and "WorkingHours" .

 Sharing  PBIX/some sample data and expected result to us  will make it easier to solve your problem.

 

BTY, The January CAP in the table  is 26 not 154, right?

 

Best Regards,
Community Support Team _ Eason

 

 

Anonymous
Not applicable

Hi,

 

Workinghours = Working days in month * hours per day

Working days in month = manually entered per month

hours per day = 7

 

CAP = sum(ResourceTimephasedDataSet[Capacity])

ResourceTimephasedDataSet[Capacity] = Column in Project Online which is linked to Power BI as Data Source
 
Here is the output I am expecting:
Year-MonthWorkinghoursCAP%age CAP
2020-011542617%
2020-021402115%

 

Hi , @Anonymous 

Try measures as below:

%age CAP = 
sumx(
    'Table',
    [CAP]/CALCULATE(MAX('Table'[Workinghours]))
)

Pbix attached

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

This works. Thanks a lot  🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors