Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

conditional counter

Hello everybody, I want to know if it's possible to create a column starting at 0 and increasing by one unit every time the value one occurs in another column. This is what I want to obtain :   ...
  • Zubair_Muhammad's avatar
    7 years ago

    Anonymous 

     

    So you can sum NB for all indices before current row..right?

     

    =
    CALCULATE (
        SUM ( table1[Nb] ),
        FILTER ( Table1, [Index] <= EARLIER ( [Index] ) )
    )