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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
inglexjc
Helper V
Helper V

Average per Program

I'm trying to show average days it took for a complaint to be received till the case was closed by program.  I'm unable to upload PBIX data.  Here is an example of what it looks like.   Some of the data will have blanks.  Is there a way to exclude the blanks in the average calculation?  I would like to show the end results in a bar graph.

 

ProgramComplaint Received DateCase Closed DateDays to closure
SNAP6/17/2025  
AF5/27/20257/23/202568
MA7/01/20257/24/202523
MA7/02/20257/24/202522
SNAP6/04/20257/23/202549

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Blanks are by default excluded in an average calcualtion.  If Days to Close is already a column in your table, then write this measure

Avg = average(Data[Days to close])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Blanks are by default excluded in an average calcualtion.  If Days to Close is already a column in your table, then write this measure

Avg = average(Data[Days to close])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur Is there a way to get the average based on the program?  It looks like it has the same average for each program.

inglexjc_0-1754498452214.png

 

Hi,

Looks like there is some problem with the relationship.  Share the download link of the PBI file and show the problem there very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I was able to fix the relationship.  

Thank you again.

ExcelMonke
Super User
Super User

Hello,
You can consider the following DAX

CALCULATE(
AVERAGE(Table[Days to Closure]),
Table[Days to Closure] <>"")




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

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors