Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I have 2 numbers, 73.08 & 65.52 which when I add together in Excel and divide by 2 to get the average I get 69.30.
However in PBI using the same 2 numbers I get 69.09
The measure in PBI is a calculation of a number of rows that equal "Y" displayed as a %
The individual rows for the 2 results display the correct numbers but the grand total row which I'm expecting to see the average doesn't?
My calculation is as follows -
GLD = (COUNTROWS(filter('1 Pupil_Assessments','1 Pupil_Assessments'[Result]="Y")))/(COUNTROWS('1 Pupil_Assessments'))
Any ideas why this might be please?
Solved! Go to Solution.
Hi,
69.30 is the result of (73.08 + 65.52)/2.
What you see in Power BI as a sub-total is the total number of successful assessments over the total number of assessments.
I think the last result should be the correct way to calculate this, but you may have other reasons to do otherwise.
Regards
Hi,
69.30 is the result of (73.08 + 65.52)/2.
What you see in Power BI as a sub-total is the total number of successful assessments over the total number of assessments.
I think the last result should be the correct way to calculate this, but you may have other reasons to do otherwise.
Regards
Thanks @LaurentCouartou that explained perfectly the difference I was getting and I understand now.
I think 69.09 is the answer I want but I need to speak to my colleagues and thanks @Anonymous for your tip.
Jason.
When things like this happen it usually has to do with a filter situation. Meaning, what you expect to see and what DAX is showing are not the same because of what is happening in the background. Any chance you can upload some sample data?
Also, be sure to use DIVIDE instead of /, since DIVIDE has built-in error catching
User | Count |
---|---|
124 | |
108 | |
99 | |
62 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |