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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
skoalit
Regular Visitor

How Average () is calculated in Power BI

Hi, 

 

Does anyone know if 'Null' values are included in the calculation of Average? And the best way to treat 'Null' and 'Blank' values, that when I do division or average, it will not show 'Infinity'? 

 

Thank you! 

6 REPLIES 6
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

Hi @skoalit,


I make a test using the following sample data.
1.PNG

When I average the values of column in a table visual, the blank values are not included in the calculation of Average, you can check the following screenshot to get details.
2.PNG


Moreover, when you do division, you can override 'Infinity’ by specifying the third parameter in Divide function so to return a fixed value such as 0. There is an example for your reference.

Column3 = DIVIDE(10,Table4[Column2],0)
3.PNG


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yuezhe-msft Thank you so much once again! 

 

However I prefer not to hard code to find the average as I would like it to be more interactive. I hope to know more about how Power BI handle blank or null values, whether it is considered in the calculation? 

 

Thank you! 

BhaveshPatel
Community Champion
Community Champion

See this BLOG on how to handle blank values. You can create a measure for counting and summing rows that do not include blank using ISBLANK to except those rows that are blank.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thanks! this is helpful! 

Hi @skoalit

You should get detailed information about how Power BI handle blank values from the blog that BhaveshPatel provides.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Can someone help me with the average of person wise for four weeks data as mentioned below in the source file.

 

If you see below screenshot i want average of four weeks with respect to employee name ... remember it has null values. Thanks

 

employee data.PNG

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.