Forum Discussion

Simao_Coimbra's avatar
Simao_Coimbra
Frequent Visitor
6 years ago
Solved

Simple Cumulative Total with a measure

Hello  everyone,

I need some help that I think will be quite simple, but I'm not getting it.

I have a measure called "HF_Mes", that returns the average chilling hours per month.



HF_Mes = SUMX(
FILTER(CLIMAS_TOTAL,
CLIMAS_TOTAL[Mes Abreviado 2]<>""),
CLIMAS_TOTAL[Horas Frio])/DISTINCTCOUNT(CLIMAS_TOTAL[Ano])
 
"Mes Abreviado 2" is Oct, Nov, Dec, Jan, Feb, Mar, Apr
 
 
I would like to add a new measure that would give me the accumulated chilling hours of the months. 
Ex: Nov: 3.1+ 34.07
...

Thank you very much in advance
  • Hi Simao_Coimbra ,

     

    Please refer to my sample.

    I have a table like this.

    Then I created a calculated column.

    // It's best to use [MonthNo], because [Month] is text type data, we can't sort it. 
    Month = [Date].[MonthNo] 

     Then I created a meaure.

    Cum = 
    CALCULATE(
        [HF_Mes],
        FILTER(
            ALLSELECTED(Sheet1),
            Sheet1[Month] <= MAX(Sheet1[Month])
        )
    )

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies