Forum Discussion
Calculate Cumulative Count for Same Period Last Year
- 3 years ago
rahul_ferns Use ALL instead of ALLSELECTED in the syntax also make sure calendar table and your data table have dates before 1 year. Also make sure tha the join date column should not have any timestamp. Like this:
Cumulative Count SPLY = var _date = MAX('Calendar'[Date]) var _max = date(year(_date)-1,month(_date),day(_date)) return CALCULATE(CALCULATE(COUNT(Tbl_Data_Register[ENTRY NUMBER]), FILTER(ALL(Calendar),Calendar[Date] <= _max)))You can follow the link below for more information regarding this issue:
If this helps you, please mark it as an accepted solution to help other users find it more easily.
rahul_ferns Use ALL instead of ALLSELECTED in the syntax also make sure calendar table and your data table have dates before 1 year. Also make sure tha the join date column should not have any timestamp. Like this:
Cumulative Count SPLY = var _date = MAX('Calendar'[Date])
var _max = date(year(_date)-1,month(_date),day(_date))
return
CALCULATE(CALCULATE(COUNT(Tbl_Data_Register[ENTRY NUMBER]), FILTER(ALL(Calendar),Calendar[Date] <= _max)))
You can follow the link below for more information regarding this issue:
If this helps you, please mark it as an accepted solution to help other users find it more easily.
Thanks, devesh