cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
po Member
Member

AVERAGE including blanks when want it to ignore blanks and 0's by default

 Hi,

 

We have a measure and had thought average exzcluded blanks by default - have lots of rows some with values some with blanks 

We set the measure to blank if value is 0  and then do average on measure but looks to ber still dividng by number of rows as opposed to number of non-blank rows.

 

Can ensure set on database to null and the average works but wondered

 

How can we best acieve an average ignoring values with blank and 0's in power bi?

 

Thanks

 

 

 

average_igoring_blanks_and_0_values.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: AVERAGE including blanks when want it to ignore blanks and 0's by default

@po,

 

You can create a measure using DAX like pattern below:

Result =
AVERAGEX ( FILTER ( Table, Table[Value] <> BLANK () ), Table[Value] )

Community Support Team _ Jimmy Tao

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

2 REPLIES 2
Community Support Team
Community Support Team

Re: AVERAGE including blanks when want it to ignore blanks and 0's by default

@po,

 

You can create a measure using DAX like pattern below:

Result =
AVERAGEX ( FILTER ( Table, Table[Value] <> BLANK () ), Table[Value] )

Community Support Team _ Jimmy Tao

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

Highlighted
po Member
Member

Re: AVERAGE including blanks when want it to ignore blanks and 0's by default

Thanks for suggestion