简体   繁体   English

跨多行,对于两个日期之间的每个工作日,计算一个值,然后按周求和并按团队成员姓名分组

[英]Across multiple rows, for each weekday in-between two dates, calculate a value, then sum by week and group by team member's name

I'm working on a team workload tracker to prevent my coworker from being overloaded with work and help them prioritize.我正在开发一个团队工作量跟踪器,以防止我的同事工作超负荷并帮助他们确定优先级。

For this task, I must use Google Sheets.对于这项任务,我必须使用 Google 表格。

Explanation:解释:

Peter, John and Harry are all team members.彼得、约翰和哈利都是团队成员。 They handle user requests all day every day.他们每天都在处理用户请求。 When they receive a request, they must enter into a table that looks like the "sample data" tab:当他们收到请求时,他们必须进入一个类似于“示例数据”选项卡的表格:

  • the workload (in days) they think they'll need to address it;他们认为需要解决的工作量(以天为单位);
  • the date they'll start working on it;他们开始工作的日期;
  • the date they must finish it by.他们必须完成的日期。

End goal:最终目标:

This is my end goal. 这是我的最终目标。 I would like to have one row per team member, and one column per week of the year that shows this team member's total weekly workload across all the requests he's handled that week.我希望每个团队成员有一行,一年中每周有一个列,显示该团队成员在该周处理的所有请求中的每周总工作量。

Notes:笔记:

  • They can have concurrent requests.他们可以有并发请求。
  • Requests can span multiple workweeks.请求可以跨越多个工作周。
  • They work Monday-Friday.他们周一至周五工作。
  • A request that takes, say, 2 days to complete does not have to be completed in the 2 days that follow its start date (because it might not be urgent).例如,需要 2 天才能完成的请求不必在其开始日期之后的 2 天内完成(因为它可能不紧急)。 For instance, a 2-day request that a team member decides to do over a period of 10 working days will take them (2/10) = 0.2 workday per day every day for 10 days.例如,团队成员决定在 10 个工作日内完成的 2 天请求将花费他们 (2/10) = 每天 0.2 个工作日,持续 10 天。
  • Each member can (but shouldn't) have a weekly workload equal or greater than 5.每个成员可以(但不应该)每周工作量等于或大于 5。

What I've done:我做了什么:

  • I've messed around with Pivot Tables but couldn't get to my end goal.我搞砸了 Pivot 表,但无法达到我的最终目标。
  • I've done the day view. 我已经完成了日视图。 I think I shouldn't use a column per day and somehow need to do all the calculation in (array?) formulas to get to the desired end goal, but I can't figure it out.我认为我不应该每天使用一列,并且以某种方式需要在(数组?)公式中进行所有计算以达到所需的最终目标,但我无法弄清楚。

Any help would be greatly appreciated!任何帮助将不胜感激!

use:利用:

=ARRAYFORMULA(QUERY(IFERROR(SPLIT(FLATTEN(IF(SEQUENCE(1; MAX(E2:E10-D2:D10))<=E2:E10-D2:D10+1; 
 A2:A10&"×"&WEEKNUM(D2:D10+SEQUENCE(1; MAX(E2:E10-D2:D10); 0); 2)&"×"&
 INDEX(SORT(QUERY(QUERY(SPLIT(FLATTEN(IF(SEQUENCE(1; MAX(E2:E10-D2:D10))<=E2:E10-D2:D10+1; 
 WEEKNUM(D2:D10+SEQUENCE(1; MAX(E2:E10-D2:D10); 0); 2)&"×"&C2:C10&TEXT(D2:D10+SEQUENCE(1; 
 MAX(E2:E10-D2:D10); 0); "×ddd×")&ROW(D2:D10); )); "×"); 
 "where not Col3 matches '^$|sam.|dim.|53'"; ); 
 "select Col2/count(Col1),Col4 group by Col2,Col4 label Col2/count(Col1)''"); 2; 1);; 1)&
 TEXT(D2:D10+SEQUENCE(1; MAX(E2:E10-D2:D10); 0); "×ddd×"); )); "×")); 
 "select Col1,sum(Col3) where not Col1 matches '53|^$' 
  and not Col4 matches 'sam.|dim.' group by Col1 pivot Col2"))

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 两个日期之间的月份插值,并使用每个月的固定值计算总和 - Interpolation of months between two dates and calculating a sum using a fixed value for each month 如何计算两 (2) 个日期之间的差异 - How to calculate the difference between two (2) dates 使用 sum 和 countifs 按月和团队在多个列中获得“是”的百分比 - 有没有更简单的方法? - using sum and countifs to get a percentage of 'yes'es across multiple columns by month and team - is there a simpler way? 如何计算 ArrayFormula 中每行的最后 7 行的总和? - How to I calculate the sum of the last 7 rows, for each row, inside an ArrayFormula? 如何查询(课程)日期列表并为每个日期返回两行 - 在每个课程日期创建两个会话 - How to query a list of (course) dates and return two rows for each date - to create two sessions on each of the course dates 计算pivot表计算字段中两个日期之间的平均持续时间 - Calculate average duration between two dates in a pivot table calculated field 如何计算谷歌表格中两个日期之间的季度数? - How to calculate numbers of quarters between two dates in google sheets? 多行两列的总和 - SUM of two columns over multiple rows =ArrayFormula 使用 SumIf Function 在 Google 表格中的两个日期之间求和 - =ArrayFormula Using SumIf Function to Sum Between Two Dates in Google Sheets 谷歌表格查询两个日期之间的总和 - Google sheets query sum total between two dates
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM