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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Prath
Frequent Visitor

Compile monthly resource capacity

I am trying to create a resource capacity matrix and need help with creating a measure that would aggregate the capacity of a resource by each month based start date & end date of the projects assigned to the resource.

 

Attached the pbix with data gdrive_link 

 

Here is how the data would look like

Prath_2-1619034019820.png

Is there a way to create a measure that would sum the capacity for each month so I can build a matrix like this for all months?

Prath_1-1619033928172.png

 

 

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

Hi, @Prath 

According to your description, I can roughly understand your requirement, I think you can try my measure to achieve this:

First, you should delete the relationship between the calendar table with the main table to avoid errors.

v-robertq-msft_0-1619424500051.png

 

Then create a measure like this:

Capacity1 =

var _value=

CALCULATE(SUM(Data[Capacity]),FILTER('Data',[Start]<=MIN('Calendar_Date'[Date])&&[End]>=MAX('Calendar_Date'[Date])))

return

IF(_value=BLANK(),0,_value)

Then create a matrix and place it and apply a filter like this:

v-robertq-msft_1-1619424500059.png

 

And you can get what you want.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

2 REPLIES 2
Prath
Frequent Visitor

Thanks @v-robertq-msft , that helped.

 

One question though. How would I tweak it so that the calculation would include the rows that don't necessarily have a start or end date as 1st? Was hoping to include the month as long as the date is in that specific month.

 

For example, in this case:

1st row would include both Jan & Feb in the calculation

2nd row would include both April & May in the calculation

 

Prath_1-1619471153804.png

 

 

 

v-robertq-msft
Community Support
Community Support

Hi, @Prath 

According to your description, I can roughly understand your requirement, I think you can try my measure to achieve this:

First, you should delete the relationship between the calendar table with the main table to avoid errors.

v-robertq-msft_0-1619424500051.png

 

Then create a measure like this:

Capacity1 =

var _value=

CALCULATE(SUM(Data[Capacity]),FILTER('Data',[Start]<=MIN('Calendar_Date'[Date])&&[End]>=MAX('Calendar_Date'[Date])))

return

IF(_value=BLANK(),0,_value)

Then create a matrix and place it and apply a filter like this:

v-robertq-msft_1-1619424500059.png

 

And you can get what you want.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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