Forum Discussion
Anonymous
6 years agoNot applicable
Cumulative count measure
I looking to creating a cumulative measure on the patient count. Patient Count column is count(table[patienid])
- 6 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)) ) )
Ashish_Mathur
Super User
6 years agoHi,
Drag Year and Month from the Calendar Table. In your visual, sort furst by Year and then by month. Try this measure
=calculate([patient count],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))
Hope this helps.
- Anonymous6 years agoNot applicable
This what i have done so far
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]) ) )gives me
The problem is after December 2018 it has to rest and in January 2019 it has to start from 99 and cumulative and so on.
How do I make it rest after the end of every year?
- v-diye-msft6 years ago
Community Support
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)) ) )