Forum Discussion
Average Of Duration
Hi Team
Can i pls have your support for the following ,i want to use the below extraction to generate :
-Average of the excecution per day per device (listed in column A) excluding week days (saturday & sunday is considerated a week day )
FYI, Colom B is calculated in millisencode and it's cummultaive per day (for each day will have many execution )
| device/name | execution | date |
| Device A | 1012 | Wednesday, July 20, 2022 |
| Device A | 469091 | Wednesday, July 20, 2022 |
| Device A | 1696291 | Wednesday, July 20, 2022 |
| Device A | 51791 | Wednesday, July 20, 2022 |
| Device A | 765491 | Wednesday, July 20, 2022 |
| Device A | 178991 | Thursday, July 21, 2022 |
| Device A | 10891 | Thursday, July 21, 2022 |
| Device A | 48991 | Thursday, July 21, 2022 |
| Device A | 48191 | Thursday, July 21, 2022 |
| Device A | 1006 | Thursday, July 21, 2022 |
| Device A | 4665 | Thursday, July 21, 2022 |
| Device A | 136691 | Thursday, July 21, 2022 |
| Device A | 375391 | Thursday, July 21, 2022 |
| Device A | 12291 | Thursday, July 21, 2022 |
| Device A | 20591 | Friday, July 22, 2022 |
| Device A | 12991 | Friday, July 22, 2022 |
| Device A | 760891 | Friday, July 22, 2022 |
| Device A | 48291 | Friday, July 22, 2022 |
| Device A | 725991 | Friday, July 22, 2022 |
| Device A | 23991 | Friday, July 22, 2022 |
| Device A | 10591 | Friday, July 22, 2022 |
| Device A | 4323 | Saturday, July 23, 2022 |
| Device A | 132891 | Saturday, July 23, 2022 |
| Device A | 2210 | Saturday, July 23, 2022 |
| Device A | 44991 | Saturday, July 23, 2022 |
| Device A | 3269 | Sunday, July 24, 2022 |
| Device A | 1021 | Sunday, July 24, 2022 |
| Device A | 71891 | Sunday, July 24, 2022 |
| Device A | 32491 | Sunday, July 24, 2022 |
| Device B | 1974 | Wednesday, July 20, 2022 |
| Device B | 3405291 | Wednesday, July 20, 2022 |
| Device B | 136991 | Wednesday, July 20, 2022 |
| Device B | 256791 | Wednesday, July 20, 2022 |
| Device B | 582691 | Wednesday, July 20, 2022 |
| Device B | 6921 | Wednesday, July 20, 2022 |
| Device A | 126791 | Thursday, July 21, 2022 |
| Device A | 1261 | Thursday, July 21, 2022 |
| Device B | 16291 | Thursday, July 21, 2022 |
| Device B | 6507 | Thursday, July 21, 2022 |
| Device B | 245991 | Thursday, July 21, 2022 |
| Device B | 43491 | Thursday, July 21, 2022 |
| Device B | 64991 | Thursday, July 21, 2022 |
| Device B | 1012 | Friday, July 22, 2022 |
| Device B | 40791 | Friday, July 22, 2022 |
| Device B | 2146 | Friday, July 22, 2022 |
| Device B | 107891 | Friday, July 22, 2022 |
| Device B | 1012 | Saturday, July 23, 2022 |
| Device B | 40791 | Saturday, July 23, 2022 |
| Device B | 2146 | Saturday, July 23, 2022 |
| Device B | 107891 | Saturday, July 23, 2022 |
| Device B | 4483 | Saturday, July 23, 2022 |
| Device B | 11391 | Saturday, July 23, 2022 |
| Device B | 6237291 | Saturday, July 23, 2022 |
| Device B | 1679291 | Saturday, July 23, 2022 |
| Device A | 3662 | Sunday, July 24, 2022 |
| Device B | 10191 | Sunday, July 24, 2022 |
| Device B | 34291 | Sunday, July 24, 2022 |
| Device B | 3201291 | Sunday, July 24, 2022 |
| Device B | 27891 | Sunday, July 24, 2022 |
| Device B | 1365291 | Sunday, July 24, 2022 |
| Device B | 274791 | Sunday, July 24, 2022 |
| Device A | 39591 | Monday, July 25, 2022 |
| Device A | 8291 | Monday, July 25, 2022 |
| Device B | 51591 | Monday, July 25, 2022 |
| Device B | 13684291 | Monday, July 25, 2022 |
| Device B | 9291 | Monday, July 25, 2022 |
| Device A | 45491 | Tuesday, July 26, 2022 |
| Device A | 1116 | Tuesday, July 26, 2022 |
| Device B | 30391 | Tuesday, July 26, 2022 |
| Device B | 14191 | Tuesday, July 26, 2022 |
Hi Wajdi ,
Try formula like below:
col_ = VAR week_day = WEEKDAY ( 'Table'[date], 1 ) RETURN IF ( week_day IN { 6, 7 }, 0, 1 )M = AVERAGEX ( FILTER ( ALL ( 'Table' ), 'Table'[device/name] = MAX ( 'Table'[device/name] ) && 'Table'[col_] = 1 ), 'Table'[execution] )If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-henryk-mstfCommunity Support
Hi Wajdi ,
Try formula like below:
col_ = VAR week_day = WEEKDAY ( 'Table'[date], 1 ) RETURN IF ( week_day IN { 6, 7 }, 0, 1 )M = AVERAGEX ( FILTER ( ALL ( 'Table' ), 'Table'[device/name] = MAX ( 'Table'[device/name] ) && 'Table'[col_] = 1 ), 'Table'[execution] )If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.