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.
Hello,
I am trying to calculate the effort accumulation for 2022 per each department. I have the following tables
Project | Department | Effort/department-day | Starting Date | Finish Date |
1 | A | 50 | 11/12/2021 | 03/02/2022 |
1 | B | 70 | 11/12/2021 | 03/02/2022 |
2 | B | 30 | 25/09/2022 | 03/02/2023 |
3 | A | 60 | 10/02/2022 | 10/05/2022 |
The tables are not related between them
For the effort/date without accumulation I have used the following formula, if it is helpful
Effort Measure Department =
var Wrong= IF(ISBLANK('Projects'[Starting Date])),True,False)
var Effort=SUMX(FILTER (
'Projects',
'Projects'[Starting Date] <= MAX('Calendar'[Date])
&& 'Projects'[Finish Date] >= MIN('Calendar'[Date])),
'Projects'[Effort department-day]*SUMX (
FILTER (
'Calendar',
'Calendar'[Date] >= MIN ( 'Projects'[Starting Date] )
&& 'Calendar'[Date] <= MAX ('Projects'[Finish Date])
),
'Calendar'[Laboral]
))
return IF(Effort=0||Wrong,0,Effort)
But I am not able to convert this formula in order to show the cumulative effort per 2022. Do you have any idea about how to perform this?
I have tried this formula but the working days per each project are always the same value, and not calculated individually
Effort Measure 2022 =
var Wrong= IF(ISBLANK(('Projects'[Starting Date])),True,False)
var Effort=SUMX(FILTER (
'Projects',
'Projects'[Starting Date] <= MAX('Calendar'[Date])
),
'Projects'[Effort department-day]*
CALCULATE(COUNTROWS(ALL('Calendar')),FILTER('Calendar','Calendar'[Laboral]=1 ),
DATESBETWEEN('Calendar'[Date],MAX(DATE(2022,1,1),RELATED('Projects'[Starting Date])),
MIN(date(2023,1,1),Related('Projects'[Finish Date]))
)
))
return IF(Effort=0||Wrong,0,Effort)
Thanks,
Pablo
EDIT: Update with expected outcome graph
Hi,
You have given the input. Could you show us the output you want to have, given this input?
Best regards.
Hi,
Hope this graph helps
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
55 | |
27 | |
23 | |
14 | |
11 |
User | Count |
---|---|
78 | |
63 | |
46 | |
17 | |
12 |