Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
List.Average is not computed correctly in this code.
[
Source = #table({"Value"}, {{null}, {1}}) & #table({"Value"}, {{2}}),
Avg = List.Average(Source[Value])
]
It computes to 1 whereas it should be 1.5. Such incorrect List.Average calculation seems to occur anytime you are working with a non-buffered table built by combining tables. If you do an average on a column in the table like the code above or in a Table.Group, the average calculation erroneously includes nulls in the value count for the denominator. If you buffer the table or buffer the list before averaging, the error does not occur. I do not see this error with List.NonNullCount, List.Median, or List.StandardDeviation.
Has this been raised as a defect with the Power BI team? I've tested this behavior with multiple tables in both Power Query for Excel and Power BI and the defect shows up in all cases.
Solved! Go to Solution.
Thank you, Vijay, for directing me to the right place to submit such issues. I have done that now and here's a link to the submission. Please fix this defect in List.Average - Microsoft Fabric Community
This is a nice reporting. The issues (or bugs) can be reported to Power BI Dev team from here
https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues
After searching there, I don't see any issue logged in this regard.
So, you will have to help out the community by logging an issue there.
Thank you, Vijay, for directing me to the right place to submit such issues. I have done that now and here's a link to the submission. Please fix this defect in List.Average - Microsoft Fabric Community
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 |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |