Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative count measure

  I looking to creating a cumulative measure on the patient count. Patient Count column is    count(table[patienid])    
  • v-diye-msft's avatar
    v-diye-msft
    5 years ago

    Hi Anonymous 

     

    Try this one:

    RunningTotal1 = 
    VAR __year = MAX(TrendingTable[Date_Start_Statusdate].[Year])
    RETURN
    CALCULATE(
        count(TrendingTable[vw_AccrualsList.patientId]),
        FILTER(allselected(TrendingTable), TrendingTable[Date_Start_Statusdate] <= MAX(TrendingTable[Date_Start_Statusdate]),values(TrendingTable(Year))
        )
    )