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
gianfrancob
Frequent Visitor

Summarise resource allocation by time periods

Hello everyone, 

 

I am new on Power Bi and I was trying to implement a function that I would normally create in excel quite easily. 

 

All I want to do is pretty simple, given the below dataset:

ResourceTaskStartEndallocation
Resource ATask A01/01/201815/01/201850
Resource ATask B01/01/201808/01/201850
Resource BTask C01/01/201808/01/2018100
Resource CTask C01/01/201822/01/201850
Resource CTask E08/01/201829/01/201820

 

I would like to generate an aggregate table/pivot similar to a Gantt chart which would give me:

for each resource its allocation in a particular time period, like this:

Allocation01/01/201808/01/201815/01/201822/01/201829/01/2018
Resource A100100505050
Resource B500000
Resource C507070200

 

 

I believe that should be a fairly common pattern. I found a lot of examples when the original table has only one date but couldn't find anything covering a period (ed with start and end date).

 

Any suggestion on how to do the above in power bi?

 

Thank you!

3 REPLIES 3
GustavoVianna
Regular Visitor

Hi @gianfrancob , did you manage to get this done?  I was hoping to find a solution for this one.

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @gianfrancob,

 

By my test with your data sample, I could get the output below which has a little different from your expected output.

 

Capture.PNG

However, I have a little confused about the value in your desired output, if is convenience, please describe your logic in more details.

 

If you want to get the output I upload above. You could follow the steps in Query Editor.

 

Untitled.png

 

Best Regards,

Cherry

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

Hi @v-piga-msft,

 

thanks for your solution. It doesn't quite do what I am looking for. I will try to be more specific:

 

I have a table, let's call it ALLOCATION, which contains

Resource

Assignment

Allocation

Allocation Start Date

Allocation End Date.

As you can see below, resources can have more than 1 assignment and the period between assignments could overlap (or not)

 

ResourceTaskStartEndallocation
Resource ATask A01/01/201815/01/201850
Resource ATask B01/01/201808/01/201850
Resource BTask C01/01/201808/01/2018100
Resource CTask D01/01/201822/01/201850
Resource CTask E08/01/201829/01/201820

 

 

What I would like to achieve is a sort of "timeline" where for a given time period (it could be a day, a week or a month). In summary, I would need to be able to select time buckets (DAYS, WEEKS mainly), which I understand in Power BI can be done using a DATE table.

 

Given the time period, I would like to calculate the SUM of the allocation for that particular resource in that particular time period. 

 

That is, let's assume we take Time period= DAY (columns), the results in the rows should be the below

 

ALOOCATION01-Jan02-Jan03-Jan04-Jan05-Jan06-Jan07-Jan08-Jan09-Jan10-Jan11-Jan
Resource A100
(TASK A + B )
100
(TASK A + B )
100
(TASK A + B )
100
(TASK A + B )
100
(TASK A + B )
100
(TASK A + B )
100
(TASK A + B )
100
(TASK A + B )
50
(TASK A)
50
(TASK A)
50
(TASK A)
Resource B100
(TASK C )
100
(TASK C )
100
(TASK C )
100
(TASK C )
100
(TASK C )
100
(TASK C )
100
(TASK C )
100
(TASK C )
000
Resource C50
(TASK D)
50
(TASK D)
50
(TASK D)
50
(TASK D)
50
(TASK D)
50
(TASK D)
50
(TASK D)
70
(TASK D + E)
70
(TASK D + E)
70
(TASK D + E)
70
(TASK D + E)

 

 

In Excel, I normally implement this with SUMIF. I sum the allocation ONLY if the DAY is in the period the allocation is ACTIVE.

 

Hope my explanation is clear now. 

 

ANy help would be much appreciated!

 

Thank you.

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.