简体   繁体   中英

Calculate average difference in time taken to complete task in Power BI

This is the Sample Data what i want to do is for each document (field "REQUIREMENT_DESCRIPTION") calculate time difference by subtracting the time in "ACTION_DATE" n row from n+1 row. And then calculate the mean and standard deviation of each document validation time.

So after searching online i found this formula which calculates the difference in time row by row.

First i split the column ACTION_DATE by "space" delimeter to separate time from date and than named the time field "ACTION_TIME".

Diff in Seconds = DATEDIFF(
                    Table[ACTION_TIME], 
                    CALCULATE(
                        MIN([ACTION_TIME]), 
                        FILTER(ALL(Table), Table[ACTION_TIME] > EARLIER(Table[ACTION_TIME]))
                    ), 
                    SECOND
                    )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM