Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Help with IF statement for cumulative totals

Hi I would like to have a Cumulative Total calculate by Company.   My issue is that it is giving the cumulative total for the whole period and not differentiating by the Company type.     ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    I found a solution!!

     

    Cumlt Hrs to Date Company = CALCULATE(SUM(ACCOUNT_HISTORY[Hours To Date]), ACCOUNT_HISTORY[PERIOD]<=EARLIER(ACCOUNT_HISTORY[PERIOD]),ALLEXCEPT(ACCOUNT_HISTORY, ACCOUNT_HISTORY [ACCOUNT.COMPANY]))

     

    It works :)