Forum Discussion

inglexjc's avatar
inglexjc
Post Patron
1 year ago
Solved

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

 

 

  • 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.

5 Replies

  • ExcelMonke's avatar
    ExcelMonke
    Impactful Individual

    Hello,
    You can consider the following DAX

    CALCULATE(
    AVERAGE(Table[Days to Closure]),
    Table[Days to Closure] <>"")
  • 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.

    • inglexjc's avatar
      inglexjc
      Post Patron

      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.

       

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        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.