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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Cumulative measure during only one year

Hello, 

I am trying to calculate the effort accumulation for 2022 per each department. I have the following tables

 

  • Projects: A table with all the projets and the effort per department and the starting and finishing date. Like this format (in project 1 department A and B are included and in project 2 only department B)
ProjectDepartmentEffort/department-dayStarting DateFinish Date
1A5011/12/202103/02/2022
1B7011/12/202103/02/2022
2B3025/09/202203/02/2023
3A6010/02/202210/05/2022

 

  • Calendar: A calendar for with all the dates and a column called "laboral" which can be 0 (the day is holiday or weekend) or 1 (the day is a working day)

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

image.png

2 REPLIES 2
ManguilibeKAO
Resolver I
Resolver I

Hi,

You have given the input. Could you show us the output you want to have, given this input?

 

Best regards.

Anonymous
Not applicable

Hi, 

 

Hope this graph helps

image.png

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.