Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
HI,
Please see below the example. In a table/matrix the total of average value is different from the real average.
This is what it look likes in power BI:
And when we calculate the average of same number in excel then it is different…it is off by some small number but I need it exactly same or the reason behind it.
| week | Average of AB | Average of BC |
| 1 | 69.00% | 67.67% |
| 2 | 77.60% | 63.28% |
| 3 | 74.60% | 58.85% |
| 4 | 89.40% | 67.36% |
| 5 | 88.90% | 72.01% |
| 6 | 95.80% | 72.96% |
| 7 | 97.60% | 93.03% |
| 8 | 96.90% | 88.91% |
| 9 | 99.50% | 99.08% |
| 10 | 77.20% | 66.94% |
| 11 | 94.30% | 89.35% |
| 12 | 80.00% | 88.72% |
| 13 | 82.90% | 89.80% |
| average | 86.44% | 78.30% |
As we can see in both the tables, even after having the same number the average of average is different.
Solved! Go to Solution.
You need to do an Average of the averages because the total that you see is Allvalues/All Rows.
TO solve this use:
AverageAB = AVERAGEX(SUMMARIZE('Table';'Table'[week];"TheAverageAB";Sum('Table'[A])/Sum('Table'[B]));[TheAverageAB])
You can change with your columns name.
You need to do an Average of the averages because the total that you see is Allvalues/All Rows.
TO solve this use:
AverageAB = AVERAGEX(SUMMARIZE('Table';'Table'[week];"TheAverageAB";Sum('Table'[A])/Sum('Table'[B]));[TheAverageAB])
You can change with your columns name.
Hi @Vvelarde,
Thank you.
In the formula for the measure, I did not understand this part:
Sum('Table'[A])/Sum('Table'[B]))
What is 'Table'[A]and 'Table'[B] representing here with respect to the table I have used as an example.
'AB' is the name of one column, there is no column named A or B.
Thanks.
Change to this:
AverageAB = AVERAGEX(SUMMARIZE('Table';'Table'[week];"TheAverageAB";Average('Table'[AB]));[TheAverageAB])
Ok, i think that is a average of two columns (A & B).
Change to this:
AverageAB = AVERAGEX(SUMMARIZE('Table';'Table'[week];"TheAverageAB";Average('Table'[AB]));[TheAverageAB])
You want an average of all averages. In excel you are using for the total the formula verage(Alltheaverages Range) is correct?
The average that you are seeing in the visual is: AllmyValues/NumberofRows so the result is different.
You can use this measure to solve this:
AverageofAB= AVERAGEX(SUMMARIZE('Table';'Table'[week];"AverageAB";Sum('Table'[ValuesA])/AVERAGE('Table'[B]));[AverageAB])
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |