Forum Discussion

JC2022's avatar
JC2022
Icon for Helper III rankHelper III
2 years ago
Solved

Work and Capacity question

Hi, I have the following table with the cumulative sum of hours of work.   MonthYear   Jul-24 Aug-24 Sep-24 Oct-24 Nov-24 Dec-24 Jan-25 Category Team Cumulative Hours Cumulative H...
  • bhanu_gautam's avatar
    2 years ago

    JC2022 , Try to create new measure for Cumulative Capacity

    Cumulative Capacity =
    VAR CurrentDate = MAX('Calendar'[Date])
    VAR WorkingDays =
    CALCULATE(
    COUNTROWS('Calendar'),
    FILTER(
    ALLSELECTED('Calendar'),
    'Calendar'[Date] <= CurrentDate
    )
    )
    RETURN
    SUMX(
    'CapacityTable',
    'CapacityTable'[Capacity per day] * WorkingDays
    )

     

    Then subtract it Cumulative Hours from it

     

    Remaining Capacity = [Cumulative Capacity] - [Cumulative Hours]