I created an attendance register app. One of the tables has virtual columns for calculating the percentage attendance based on conditions.
Two virtual columns calculate the total lessons conducted in each semester ie
Semester 1 total with expression:
COUNT(SELECT(Semester1[LessonID], AND( ([Course Code]=[_THISROW].[Course Offered]), (YEAR([Date])=[_THISROW].[Year]))))
Semester 2 total:
COUNT(SELECT(Semester2[LessonID], AND( ([Course Code]=[_THISROW].[Course Offered]), (YEAR([Date])=[_THISROW].[Year]))))
the other virtual columns calculate attended classes by a student ie
First semester attendance:
COUNT(SELECT(StdSemester1[Lessonkey], (AND(([Student Number]=[_THISROW].[Student]), ([Course_Done] = [_THISROW].[Course Offered])))))
and Second semester attendance:
COUNT(SELECT(StdSemester2[Lessonkey], (AND(([Student Number]=[_THISROW].[Student]), ([Course_Done] = [_THISROW].[Course Offered])))))
The last virtual column calculates the percentage attendance using formula:
IFS([Period]=โSemester 1โ,(([First Semester attendance]/[Semester1 total])*100), [Period]=โSemester 2โ,(([Second Semester attendance]/[Semester2 total])*100))
All these virtual columns show the correct answer in a form after entering input data in prior fields,
however the problem is upon saving the record, the percentage attendance column becomes 0.00 always. how do i resolve this?
User | Count |
---|---|
19 | |
10 | |
7 | |
5 | |
5 |