Forum Discussion
Conditional Measure
Good Afternoon
I am having an issue with finding a DAX and I was hoping someone on here may be able to help me. I have a measure that is working out the percentage attendance of students in a school. I want to then award points to the students who have achieved 100% in the term. The calendar for the terms is in a seperate table which I created in power bi. this table is linked to the report for attendance byt the date field in both tables.
everything ive looked at seems to be to return a text field. but I need a numerical return so that I can do a calculation of points achieved overall etc. Can anyone help?
Anonymous
pls see the attachment below
12 Replies
- ryan_mayuSuper User
Anonymous
could you pls provide the sample data and expected output?
- AnonymousNot applicable
Yes no problem
So I have a CSV with various marks entered in a register for students. I have then in a measure calculated the rows that have the present attendance marks against the possible to give me the percentage attendance. Based on the date range of the marks against the academic calendar would determine the column marks HT1, HT2, HT3 etc (these are the term names). There is a relationship between the two tables.
The students that have recieved 100% for the term should recieve 100pts. I then needs to do this by week so if there is a DAX i could just amend this to reflect the week rather than term.
HT1 %Present HT1 Pts HT2 %Present HT2 Pts Average% Total HT Pts 100.00% 100 95% 0 97.5% 100 98.47% 0 100% 100 50% 100 95.56% 0 100% 100 50% 100 - AnonymousNot applicable
So the outcome here is I need to a DAX to calculate if the Attendance % for HT1 = 100 then return the Value 100 is else then 0. What I need though is for the Term total and week total to be be returned in seperate columns/Measures that i could then add up at the end so kind of like a running total of points