Forum Discussion

jepps's avatar
jepps
New Member
6 years ago
Solved

Average Excluding Zero's

I have a request to find the average days to certain stages in a process.  For example from beginning to end, whats the average number of days.  I have a formula that calculates the number of days (BELOW) and is working properly.  I have an issue when i try to calculate the average of the group for this formula.  It always includes 0.

 

DAYS TO CONCLUSION = IF('METRICS TAB'[SETTLED DATE].[Date] , 'METRICS TAB'[SETTLED DATE].[Date]-'METRICS TAB'[NewColumn.ASSIGNED].[Date],0)

 

Any Help????

  • Hi jepps,

    In your scenario , did you want to exclude 0 rows when calculate average? If so, you could try to use below measure to see whether it work or not.

    Measure 4 = CALCULATE(SUM(t4[amount]))/CALCULATE(COUNT(t4[name]), FILTER(t4, t4[amount]<>0))

     

    If this is not what you want, please correct me and inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

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

1 Reply

  • dax's avatar
    dax
    Community Support

    Hi jepps,

    In your scenario , did you want to exclude 0 rows when calculate average? If so, you could try to use below measure to see whether it work or not.

    Measure 4 = CALCULATE(SUM(t4[amount]))/CALCULATE(COUNT(t4[name]), FILTER(t4, t4[amount]<>0))

     

    If this is not what you want, please correct me and inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi

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