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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Calculate Average issue

Hi,

 

I am trying to get the average of each product and showing a card, like(picture 2).

By using Average, it gives me a wrong answer because the there are many rows of records with value =0, 

when it average out, the wrong average numbers are much smaller.

The total is fine, so I expect my average of product C is about 1K.

 

Any help is much appreciated.

 

C1.PNGC2.PNG

1 ACCEPTED SOLUTION

Hmm. Perhaps make it a Measure, rather than a calculated column?

View solution in original post

3 REPLIES 3
wwhittenton
Helper II
Helper II

If it's as simple as averaging a single column of data, you should be able to do this:

 

Avg Product= CALCULATE( AVERAGE(TableName[ProductCount]), FILTER(TableName, TableName[ProductCount] <> 0 ))

Anonymous
Not applicable

Thanks for your suggestion.

I tried and still give me the same answer. Not sure if it calculate all rows of the data set.

 

I have filter to show only 2017 months and I want to get the average for the reported months.

Hmm. Perhaps make it a Measure, rather than a calculated column?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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