Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
If I run an Access ave of latest 3 monht ave index score, I get 82.65, which is correct if I test manually.
If I use measurement for sample: =CALCULATE(COUNT(TABLE[INDEX]), DATESINPERIOD(TABLE[MONTH], MAX(TABLE[MONTH], -3, MONTH)) I get the correct sample count for the latest 3 months index sample.
However, then using: =CALCULATE(AVERAGE(TABLE[INDEX], DATESINPERIOD(TABLE[MONTH], MAX(TABLE[MONTH], -3, MONTH)) I get 82.78
Why the 'incorrect' ave calculation?
Thank you
Hi @Albertvw,
In DAX, when a column contains blank values, those rows will not be counted in AVERAGE() function. I think this is the reason why you get a little greater result when using AVERAGE() funciton. Please see: AVERAGE Function (DAX). To avoid this issue, you can use SUM divide by COUNTROWS to get correct result.
Regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |