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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate Average of "Not Empty" Cell

Hello,

 

I have a data source, which is an excel table that looks something like this:

manhuynguyen_0-1638285816982.png

I want to import it into PBI Desktop and calculate the average of non-blank items (the result in this case would be 50). Any suggestion how I could do it effectively?

 

Thank you,

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

1. Calculated column

Average = 
IF ( [Value] == BLANK (), BLANK (), AVERAGE ( 'Table'[Value] ) )

vzhangti_0-1638522415184.png

 

2. Measure

Average M = 
IF ( MAX('Table'[Value]) == BLANK (), BLANK (), AVERAGE ( 'Table'[Value] ) )

vzhangti_1-1638522570825.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

You can try the following methods.

1. Calculated column

Average = 
IF ( [Value] == BLANK (), BLANK (), AVERAGE ( 'Table'[Value] ) )

vzhangti_0-1638522415184.png

 

2. Measure

Average M = 
IF ( MAX('Table'[Value]) == BLANK (), BLANK (), AVERAGE ( 'Table'[Value] ) )

vzhangti_1-1638522570825.png

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Nathaniel_C
Community Champion
Community Champion

hI @Anonymous , use COUNTA()

Count for average = 


var _sum = SUM(FruitTable[Count])
var _count = Counta(FruitTable[Count])

return DIVIDE(_sum,_count)

Nathaniel_C_0-1638288429546.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors