March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I have a problem creating a DAX measure to calculate the average per subject of the grades of a group of students. The measure will be used, in principle, in a visual object of grouped columns and lines in which the subject will go on the X axis, in the Y axis the note on the Y axis of line the average grade of the subject. In the report there will be a segmentation by student and by evaluation.
The average grade of the subject will be that of all active students (Active = "Active" or AverageStudent>1, both are calculated columns of the table).
The data table would be similar to the following. I thank you for your help.
Best regards
Evaluation | Index | Student | NotaMediaAlumno | Active | Subject | Note |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | BADAT | 4 |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | END | 2 |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | FOL | 7 |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | LEUP | 7 |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | LMSGI | 4 |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | PROGR | 1 |
First Evaluation | 1 | Alumno01 Alumno01 Alumno01 | 3,857142857 | Active | INNERMOST | 2 |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | BADAT | 5 |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | END | 2 |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | FOL | null |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | LEUP | 8 |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | LMSGI | 7 |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | PROGR | 2 |
First Evaluation | 2 | Alumno02 Alumno02 Alumno02 | 4,833333333 | Active | INNERMOST | 5 |
I tried several ways; I was working on two:
what is the current measure that you created?
Maybe try
Average Grade per Subject =
CALCULATE(
AVERAGE('Table'[Note]),
'Table'[Active] = "Active" || 'Table'[NotaMediaAlumno] > 1,
ALLEXCEPT('Table', 'Table'[Subject])
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |