cancel
Showing results for
Did you mean:
Frequent Visitor

## How to create an effort calendar by resources from tasks with only start and end dates?

Hello,

I would like to create a "calendared" dataset showing the aggregate effort for each resource for each day.

My model consists of:

1. Resource table: with Id and Name
3. Calendar table: which is the time horizon I would like to calculate the aggregation.

The output should be a table where each row has: each resource and each day, calculate the sum of the effort.

Resource 1 | Day 1 | Effort:100

Resource 1 | Day 2 | Effort:50

Resource 1 | Day 3 | Effort:50

Resource 2 | Day 1 | Effort:100

Resource 2 | Day 2 | Effort:100

Resource 2 | Day 3 | Effort:25

The challenge I am facing is that the tasks have a start and end date and I am not sure how to build the filters to perform that computation (attached PowerBI model).

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: How to create an effort calendar by resources from tasks with only start and end dates?

Hi @gianfrancob ,

We can create a calculated table as below.

```Table 3 =
VAR k =
CROSSJOIN ( DISTINCT ( 'Table'[task_id] ), CALENDARAUTO () ),
)
VAR eff =
k,
"a", CALCULATE (
FILTER (
)
)
)
RETURN
FILTER ( eff, [a] <> BLANK () && [a] >= 0 )
```

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
2 REPLIES 2
Community Support Team

## Re: How to create an effort calendar by resources from tasks with only start and end dates?

Hi @gianfrancob ,

We can create a calculated table as below.

```Table 3 =
VAR k =
CROSSJOIN ( DISTINCT ( 'Table'[task_id] ), CALENDARAUTO () ),
)
VAR eff =
k,
"a", CALCULATE (
FILTER (
)
)
)
RETURN
FILTER ( eff, [a] <> BLANK () && [a] >= 0 )
```

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Frequent Visitor

## Re: How to create an effort calendar by resources from tasks with only start and end dates?

Hi,

thank you for the response, it seems to be working on the test dataset - I will roll that out on the PROD one.

It would be great if you could also explain a few things regarding the solution:

• You create a table called "Table" where you summarise the Tasks by End Date? Is that correct? what is the rationale?
`Table = SUMMARIZECOLUMNS(Tasks[end_date],Tasks[start_date],Tasks[task_id],"value",SUM(Tasks[effort]))`
• When you use CALENDARAUTO() in the cross-join the date range is implicit and is not clear which range the function uses?

Thank you

Best,

Gian

Announcements

#### Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

#### Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)