Forum Discussion
Retention: Returnees Minus Completers Calculated
- Anonymous6 years ago
Hi Mitig ,
I just updated your measure as below:
1. Get ID Num for the next year and same quarter
2. Find the ID Num which both exist in current year and next year with same quarter, and exclude ID NUM which already completed
Retained in Quarter_Code = var y=2018 var q=20 var _ID=CALCULATETABLE(VALUES('TABLE1'[ID_NUM]),FILTER(ALL('TABLE1'),'TABLE1'[Year]=y+1&&'TABLE1'[Quarter_Code]=q)) return CALCULATE(DISTINCTCOUNT('TABLE1'[ID_NUM]), FILTER('TABLE1','TABLE1'[ID_NUM] in _ID &&'TABLE1'[Year]=y&&'TABLE1'[Quarter_Code]=q&&ISBLANK('TABLE1'[Completed_Date])))Best Regards
Rena
Anonymous - The returned IDs would be only those color coded in green above (0002 & 0007). So only two IDs from the table above would be returned as "retained."
The purple would all be filtered out regardless of if they were present in both "20" quarter codes in 2018 and 2019 because they completed. Given the completer status, 0003 would be excluded, even though they were present for both "20" codes in both years.
The reds and blacks would not be returned either, as they were not present for both "20" quarter codes in both years.
Apologies for any confusion, and I hope that helps!
Hi Mitig ,
I just updated your measure as below:
1. Get ID Num for the next year and same quarter
2. Find the ID Num which both exist in current year and next year with same quarter, and exclude ID NUM which already completed
Retained in Quarter_Code =
var y=2018
var q=20
var _ID=CALCULATETABLE(VALUES('TABLE1'[ID_NUM]),FILTER(ALL('TABLE1'),'TABLE1'[Year]=y+1&&'TABLE1'[Quarter_Code]=q))
return CALCULATE(DISTINCTCOUNT('TABLE1'[ID_NUM]), FILTER('TABLE1','TABLE1'[ID_NUM] in _ID &&'TABLE1'[Year]=y&&'TABLE1'[Quarter_Code]=q&&ISBLANK('TABLE1'[Completed_Date])))Best Regards
Rena
- Mitig6 years agoFrequent Visitor
Anonymous -- Thank you very much for this! Though I am seeing some issues with my SQL-connected dataset, I am marking this as solved here. I am not fully there for my data model yet, but this has given me some insight on ways to troubleshoot the issue; if I cannot resolve, it would merit a brand new post. In any case, thank you again!