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
Anonymous
Not applicable

Help with DAX to calculate Resource allocation %

Hi Team

 

I have twotables. I need help in DAX to create a heatmap showing resource allocation %.. How each resource is allocated in each month based on their plan hours and capacity hours.

 

SL.NProject NameResource NamePlanned StartPlanned FinishActual StartActual FinishCapacity hoursPlan hours  Actual Hours
1Project ASam8-Feb-2228-Feb-228-Feb-2228-Feb-22160140120
2Project BTed1-Mar-2231-Mar-221-Mar-22 184160 

 

 

Capacity Table             
SL NoResource NameJanFebMarAprMayJunJulAugSepOctNovDec
1Sam160160184160172160184184160160160160
2Ted160160184160172160184184160160160160
2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for that the information you have provided is not making the problem clear to me.I'm confused about how resource be allocated.

 

Refer to:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

How to Get Your Question Answered Quickly - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin

lbendlin
Super User
Super User

There's a lot to unpack here.  Your capacity table needs to be unpivoted to make it useful.  You may also want to add the year to the timestamp

 

lbendlin_0-1647735362234.png

Next you need to decide how you want to handle projects that complete in less than a month (like project A) or projects that stretch over multiple months.  I assume your capacity numbers are based on working days in each month? If so then you will want to add a calendar table that indicates that.

 

Your sample data will not show a heatmap. only a color blob for Sam in February and Ted in March.  For a real heatmap you may want to add some more project sample data.

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.