Forum Discussion
Powerlearn_95
2 years agoFrequent Visitor
Counting iteration under a category- count if (containsstring)/match
Hi, Thank you for reviewing my questions. I've been tackling a problem in BI, but I haven't had much luck. I am working with a model that analyzes student completion rate. Students can ...
ryan_mayu
Super User
2 years agoyou can try this
Column = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Actual exit date]=EARLIER('Table'[student scheduled grad])&&'Table'[Gradutation status]<>"on time"))+0
pls see the attachment below
Powerlearn_95
2 years agoFrequent Visitor
Wonderful, thank you! I am truly thanksful and grateful for your time and help!
I can see that this counts all the transfer ins referencing scheduled cohort. This is very close. If I wanted to do it in a way that categorizes the count by degree, can I add another filter. Or maybe do an iteration column so when I have it as a table in BI I can just filter by degree?
For example, if I have a larger dataset with varying degrees (i.e. Mathematics, English, Engineering, etc.), would I have to create an && filter that uses contains string and create a different column for each degree or is there a way to do it by degree. Refrence table below:
| Student ID | Student Scheduled Grad | Actual exit date | Transferred into cohort | Graduation Status | Scheduled Cohort transfer in (count) | Degree |
| 111 | 2/4/2023 | 2/4/2023 | graduated on-time | 2 | English | |
| 112 | 3/11/2023 | 2/4/2023 | 2/4/2023 | Graduated late | 1 | English |
| 113 | 3/11/2023 | 2/4/2023 | 2/4/2023 | Graduated late | 1 | English |
| 114 | 4/12/2023 | 4/12/2023 | graduated on-time | 0 | English | |
| 115 | 5/16/2023 | 3/11/2023 | 3/11/2023 | graduated early | 0 | English |
| 116 | 6/12/2023 | 6/12/2023 | graduated on-time | 0 | English | |
| 117 | 2/4/2023 | 2/4/2023 | graduated on-time | 2 | Mathematics | |
| 118 | 3/11/2023 | 2/4/2023 | 2/4/2023 | Graduated late | 1 | Mathematics |
| 119 | 3/11/2023 | 2/4/2023 | 2/4/2023 | Graduated late | 1 | Mathematics |
| 120 | 4/12/2023 | 4/12/2023 | graduated on-time | 0 | Mathematics | |
| 121 | 5/16/2023 | 3/11/2023 | 3/11/2023 | graduated early | 0 | Mathematics |
| 122 | 6/12/2023 | 6/12/2023 | graduated on-time | 0 | Mathematics | |
| 111 | 2/4/2023 | 2/4/2023 | graduated on-time | 2 | Engineering | |
| 112 | 3/11/2023 | 2/4/2023 | 2/4/2023 | Graduated late | 1 | Engineering |
| 113 | 3/11/2023 | 2/4/2023 | 2/4/2023 | Graduated late | 1 | Engineering |
| 114 | 4/12/2023 | 4/12/2023 | graduated on-time | 0 | Engineering | |
| 115 | 5/16/2023 | 3/11/2023 | 3/11/2023 | graduated early | 0 | Engineering |
| 116 | 6/12/2023 | 6/12/2023 | graduated on-time | 0 | Engineering |