Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
doug_morris
Frequent Visitor

List.Average calculation problem

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.

1 ACCEPTED 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

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.