Forum Discussion

speterson's avatar
speterson
Regular Visitor
4 years ago
Solved

Calculate & show average Time Elapsed?

Hi Team!


Can you please help me with this seeminly simple situation?


I first need to calculate the time elapsed between 2 different dates

 

and then have it displayed in such a way that will show me the average time elapsed in days

 

 

THANK YOU! 

  • Please specify what the time elapsed is between 20-Feb and 21-Feb.  Is it one day or two days?

     

    You can use

    Elapsed = AVERAGEX(Orders,Orders[Date Completed]-Orders[Date Assigned])

    , for example.

2 Replies

  • Please specify what the time elapsed is between 20-Feb and 21-Feb.  Is it one day or two days?

     

    You can use

    Elapsed = AVERAGEX(Orders,Orders[Date Completed]-Orders[Date Assigned])

    , for example.

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    HI speterson ,

    Test the below,create a new column,as your picture provided:

    Timeelapsed = DATEDIFF('Table'[Date assigned],'Table'[Date Completed],DAY)

     

    Then create a measure:

    average = CALCULATE(SUM('Table'[Timeelapsed]),ALL('Table'))/CALCULATE(DISTINCTCOUNT('Table'[Order#]),ALL('Table'))

     

    Output:

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


    Best Regards

    Lucien