Reputation: 67
I have a table where a Student's GPA shows up in multiple rows due to grades received in different subjects. I am trying to calculate the Average GPA in Power BI using DAX, I am still a beginner when it comes to DAX calculations. I am providing a table below along with my formula. Can someone please tell me what am I doing wrong here?
Average(values(tbl[GPA]),DistinctCount(tbl1[ID])))
I am attaching a sample here below:
Upvotes: 2
Views: 1393
Reputation: 493
Instead of Average, use AverageX as below
AVERAGEX(VALUES(tbl1[ID]), CALCULATE(AVERAGE(tbl1[GPA])))
Upvotes: 2
Reputation: 81
Upvotes: 1